AF
momapy.sbgn.af
Classes for SBGN AF maps
Classes:
| Name | Description |
|---|---|
Activity |
Class for activities |
AndOperator |
Class for and operators |
AndOperatorLayout |
Class for and operator layouts |
BiologicalActivity |
Class for biological activities |
BiologicalActivityLayout |
Class for biological activity layouts |
Compartment |
Class for compartments |
CompartmentLayout |
Class for compartment layouts |
ComplexUnitOfInformation |
Class for complex units of information |
ComplexUnitOfInformationLayout |
Class for complex unit of information layouts |
DelayOperator |
Class for delay operators |
DelayOperatorLayout |
Class for delay operator layouts |
EquivalenceArcLayout |
Class for equivalence arc layouts |
Influence |
Class for influences |
LogicArcLayout |
Class for logic arc layouts |
LogicalOperator |
Class for logical operators |
LogicalOperatorInput |
Class for inputs of logical operators |
MacromoleculeUnitOfInformation |
Class for marcomolecule units of information |
MacromoleculeUnitOfInformationLayout |
Class for macromolecule unit of information layouts |
NecessaryStimulation |
Class for necessary stimulations |
NecessaryStimulationLayout |
Class for necessary stimulation layouts |
NegativeInfluence |
Class for negative influences |
NegativeInfluenceLayout |
Class for negative influence layouts |
NotOperator |
Class for not operators |
NotOperatorLayout |
Class for not operator layouts |
NucleicAcidFeatureUnitOfInformation |
Class for nucleic acid feature units of information |
NucleicAcidFeatureUnitOfInformationLayout |
Class for nucleic acid feature unit of information layouts |
OrOperator |
Class for or operators |
OrOperatorLayout |
Class for or operator layouts |
PerturbationUnitOfInformation |
Class for perturbation units of information |
PerturbationUnitOfInformationLayout |
Class for perturbation unit of information layouts |
Phenotype |
Class for phenotypes |
PhenotypeLayout |
Class for phenotype layouts |
PositiveInfluence |
Class for positive influences |
PositiveInfluenceLayout |
Class for positive influence layouts |
SBGNAFLayout |
Class for SBGN-AF layouts |
SBGNAFMap |
Class for SBGN-AF maps |
SBGNAFModel |
Class for SBGN-AF models |
SimpleChemicalUnitOfInformation |
Class for simple chemical units of information |
SimpleChemicalUnitOfInformationLayout |
Class for simple chemical unit of information layouts |
Submap |
Class for submaps |
SubmapLayout |
Class for submap layouts |
Tag |
Class for tags |
TagLayout |
Class for tag layouts |
TagReference |
Class for references of tags |
Terminal |
Class for terminals |
TerminalLayout |
Class for terminal layouts |
TerminalReference |
Class for references of terminals |
UnitOfInformation |
Base class for units of information |
UnknownInfluence |
Class for unknown influences |
UnknownInfluenceLayout |
Class for unknown influence layouts |
UnspecifiedEntityUnitOfInformation |
Class for unspecified entity units of information |
UnspecifiedEntityUnitOfInformationLayout |
Class for unspecified entity unit of information layouts |
Attributes:
| Name | Type | Description |
|---|---|---|
SBGNAFLayoutBuilder |
Class for SBGN-AF layout builders |
|
SBGNAFMapBuilder |
Class for SBGN-AF map builders |
|
SBGNAFModelBuilder |
Class for SBGN-AF model builders |
Activity
dataclass
Bases: SBGNModelElement
Class for activities
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id_
|
str
|
The id of the map element. This id is purely for the user to keep track of the element, it does not need to be unique and is not part of the identity of the element, i.e., it is not considered when testing for equality between two map elements or when hashing the map element |
'6d925c58-defe-4ed2-b674-cd6388579056'
|
AndOperator
dataclass
AndOperator(
*,
id_: str = make_uuid4_as_str(),
inputs: frozenset[LogicalOperatorInput] = frozenset(),
)
Bases: LogicalOperator
Class for and operators
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id_
|
str
|
The id of the map element. This id is purely for the user to keep track of the element, it does not need to be unique and is not part of the identity of the element, i.e., it is not considered when testing for equality between two map elements or when hashing the map element |
'52370a17-3860-4c65-895d-400b1050c0e9'
|
inputs
|
frozenset[LogicalOperatorInput]
|
frozenset() -> empty frozenset object frozenset(iterable) -> frozenset object Build an immutable unordered collection of unique elements. |
<class 'frozenset'>
|
AndOperatorLayout
dataclass
AndOperatorLayout(
fill: NoneValueType | Color | None = white,
stroke: NoneValueType | Color | None = black,
stroke_width: float | None = 1.25,
*,
id_: str = make_uuid4_as_str(),
layout_elements: tuple[LayoutElement] = tuple(),
group_fill: NoneValueType | Color | None = None,
group_fill_rule: FillRule | None = None,
group_filter: NoneValueType | Filter | None = None,
group_font_family: str | None = None,
group_font_size: float | None = None,
group_font_style: FontStyle | None = None,
group_font_weight: FontWeight | float | None = None,
group_stroke: NoneValueType | Color | None = None,
group_stroke_dasharray: tuple[float, ...] | None = None,
group_stroke_dashoffset: float | None = None,
group_stroke_width: float | None = None,
group_text_anchor: TextAnchor | None = None,
group_transform: NoneValueType
| tuple[Transformation]
| None = None,
filter: NoneValueType | Filter | None = None,
height: float = 30.0,
label: TextLayout | None = None,
position: Point,
stroke_dasharray: tuple[float, ...] | None = None,
stroke_dashoffset: float | None = None,
transform: NoneValueType
| tuple[Transformation]
| None = None,
width: float = 30.0,
direction: Direction = HORIZONTAL,
left_to_right: bool = True,
left_connector_length: float = 10.0,
right_connector_length: float = 10.0,
left_connector_stroke: NoneValueType
| Color
| None = None,
left_connector_stroke_width: float | None = None,
left_connector_stroke_dasharray: NoneValueType
| tuple[float]
| None = None,
left_connector_stroke_dashoffset: float | None = None,
left_connector_fill: NoneValueType
| Color
| None = None,
left_connector_transform: NoneValueType
| tuple[Transformation]
| None = None,
left_connector_filter: NoneValueType
| Filter
| None = None,
right_connector_stroke: NoneValueType
| Color
| None = None,
right_connector_stroke_width: float | None = None,
right_connector_stroke_dasharray: NoneValueType
| tuple[float]
| None = None,
right_connector_stroke_dashoffset: float | None = None,
right_connector_fill: NoneValueType
| Color
| None = None,
right_connector_transform: NoneValueType
| tuple[Transformation]
| None = None,
right_connector_filter: NoneValueType
| Filter
| None = None,
)
Bases: _ConnectorsMixin, _SimpleMixin, _TextMixin, SBGNNode
Class for and operator layouts
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id_
|
str
|
The id of the map element. This id is purely for the user to keep track of the element, it does not need to be unique and is not part of the identity of the element, i.e., it is not considered when testing for equality between two map elements or when hashing the map element |
'8f57a825-1405-4213-aabe-29ecde0f03af'
|
layout_elements
|
tuple[LayoutElement]
|
The sub-layout elements of the group layout. These are part of the children of the group layout |
<dynamic>
|
group_fill
|
NoneValueType | Color | None
|
The fill color of the group layout |
None
|
group_fill_rule
|
FillRule | None
|
The fill rule of the group layout |
None
|
group_filter
|
NoneValueType | Filter | None
|
The filter of the group layout |
None
|
group_font_family
|
str | None
|
The font family of the group layout |
None
|
group_font_size
|
float | None
|
The font size of the group layout |
None
|
group_font_style
|
FontStyle | None
|
The font style of the group layout |
None
|
group_font_weight
|
FontWeight | float | None
|
The font weight of the group layout |
None
|
group_stroke
|
NoneValueType | Color | None
|
The stroke color of the group layout |
None
|
group_stroke_dasharray
|
tuple[float, ...] | None
|
The stroke dasharray of the group layout |
None
|
group_stroke_dashoffset
|
float | None
|
The stroke dashoffset of the group layout |
None
|
group_stroke_width
|
float | None
|
The stroke width of the group layout |
None
|
group_text_anchor
|
TextAnchor | None
|
The text anchor of the group layout |
None
|
group_transform
|
NoneValueType | tuple[Transformation] | None
|
The transform of the group layout |
None
|
fill
|
NoneValueType | Color | None
|
|
Color(red=255, green=255, blue=255, alpha=1.0)
|
filter
|
NoneValueType | Filter | None
|
The filter of the node |
None
|
height
|
float
|
|
30.0
|
label
|
TextLayout | None
|
The label of the node |
None
|
position
|
Point
|
The position of the node |
required |
stroke
|
NoneValueType | Color | None
|
|
Color(red=0, green=0, blue=0, alpha=1.0)
|
stroke_dasharray
|
tuple[float, ...] | None
|
The stroke dasharray of the node |
None
|
stroke_dashoffset
|
float | None
|
The stroke dashoffset of the node |
None
|
stroke_width
|
float | None
|
|
1.25
|
transform
|
NoneValueType | tuple[Transformation] | None
|
The transform of the node |
None
|
width
|
float
|
|
30.0
|
direction
|
Direction
|
|
<Direction.HORIZONTAL: 1>
|
left_to_right
|
bool
|
|
True
|
left_connector_length
|
float
|
|
10.0
|
right_connector_length
|
float
|
|
10.0
|
left_connector_stroke
|
NoneValueType | Color | None
|
|
None
|
left_connector_stroke_width
|
float | None
|
|
None
|
left_connector_stroke_dasharray
|
NoneValueType | tuple[float] | None
|
|
None
|
left_connector_stroke_dashoffset
|
float | None
|
|
None
|
left_connector_fill
|
NoneValueType | Color | None
|
|
None
|
left_connector_transform
|
NoneValueType | tuple[Transformation] | None
|
|
None
|
left_connector_filter
|
NoneValueType | Filter | None
|
|
None
|
right_connector_stroke
|
NoneValueType | Color | None
|
|
None
|
right_connector_stroke_width
|
float | None
|
|
None
|
right_connector_stroke_dasharray
|
NoneValueType | tuple[float] | None
|
|
None
|
right_connector_stroke_dashoffset
|
float | None
|
|
None
|
right_connector_fill
|
NoneValueType | Color | None
|
|
None
|
right_connector_transform
|
NoneValueType | tuple[Transformation] | None
|
|
None
|
right_connector_filter
|
NoneValueType | Filter | None
|
|
None
|
Methods:
| Name | Description |
|---|---|
anchor_point |
Return an anchor point of the layout element |
angle |
Return the point on the border of the node that intersects the drawing elements of the node with the line passing through the center anchor point of the node and at a given angle from the horizontal. |
bbox |
Compute and return the bounding box of the group layout element |
border |
Return the point on the border of the node that intersects the drawing elements of the node with the line formed of the center anchor point of the node and the given point. |
center |
Return the center anchor of the node |
childless |
Return a copy of the node with no children |
children |
Return the children of the group layout. |
contains |
Return |
descendants |
Return the descendants of the layout element |
drawing_elements |
Return the drawing elements of the group layout. |
east_north_east |
Return the east north east anchor of the node |
east_south_east |
Return the east south east west anchor of the node |
equals |
Return |
flattened |
Return a list containing copy of the layout element with no children and all its descendants with no children |
label_center |
Return the label center anchor of the node |
north_east |
Return the north east anchor of the node |
north_north_east |
Return the north north east anchor of the node |
north_north_west |
Return the north north west anchor of the node |
north_west |
Return the north west anchor of the node |
self_angle |
Return the point on the border of the node that intersects the self drawing elements of the node with the line passing through the center anchor point of the node and at a given angle from the horizontal. |
self_bbox |
Compute and return the bounding box of the self drawing element of the group layout |
self_border |
Return the point on the border of the node that intersects the self drawing elements of the node with the line formed of the center anchor point of the node and the given point. |
self_children |
Return the self children of the node. A node has unique child that is its label |
self_drawing_elements |
Return the node's own drawing elements |
self_to_shapely |
Compute and return a shapely collection of geometries reproducing the self drawing elements of the group layout |
size |
Return the size of the node |
south_east |
Return the south east anchor of the node |
south_south_east |
Return the south south east anchor of the node |
south_south_west |
Return the south south west anchor of the node |
south_west |
Return the south west anchor of the node |
to_shapely |
Return a shapely collection of geometries reproducing the drawing elements of the layout element |
west_north_west |
Return the west north west anchor of the node |
west_south_west |
Return the west south west anchor of the node |
Attributes:
| Name | Type | Description |
|---|---|---|
x |
float
|
Return the x coordinate of the node |
y |
float
|
Return the y coordinate of the node |
anchor_point
anchor_point(anchor_name: str) -> Point
angle
angle(
angle: float,
unit: Literal["degrees", "radians"] = "degrees",
) -> Point
Return the point on the border of the node that intersects the drawing elements of the node with the line passing through the center anchor point of the node and at a given angle from the horizontal.
Source code in src/momapy/core.py
bbox
bbox() -> Bbox
Compute and return the bounding box of the group layout element
Source code in src/momapy/core.py
border
Return the point on the border of the node that intersects the drawing elements of the node with the line formed of the center anchor point of the node and the given point. When there are multiple intersection points, the one closest to the given point is returned
Source code in src/momapy/core.py
center
center() -> Point
childless
children
children() -> list[LayoutElement]
Return the children of the group layout.
These are the self children of the group layout (returned by the self_children method) and the other children of the group layout (given by the layout_elements attribute)
Source code in src/momapy/core.py
contains
contains(other: LayoutElement) -> bool
Return true if another layout element is a descendant of the layout element, false otherwise
drawing_elements
drawing_elements() -> list[DrawingElement]
Return the drawing elements of the group layout. The returned drawing elements are a group drawing element formed of the self drawing elements of the group layout and the drawing elements of its children
Source code in src/momapy/core.py
east_north_east
east_north_east() -> Point
Return the east north east anchor of the node
Source code in src/momapy/core.py
east_south_east
east_south_east() -> Point
Return the east south east west anchor of the node
Source code in src/momapy/core.py
equals
equals(
other: LayoutElement,
flattened: bool = False,
unordered: bool = False,
) -> bool
Return true if the layout element is equal to another layout element, false otherwise
Source code in src/momapy/core.py
flattened
flattened() -> list[LayoutElement]
Return a list containing copy of the layout element with no children and all its descendants with no children
Source code in src/momapy/core.py
label_center
label_center() -> Point
north_east
north_east() -> Point
Return the north east anchor of the node
Source code in src/momapy/core.py
north_north_east
north_north_east() -> Point
Return the north north east anchor of the node
Source code in src/momapy/core.py
north_north_west
north_north_west() -> Point
Return the north north west anchor of the node
Source code in src/momapy/core.py
north_west
north_west() -> Point
Return the north west anchor of the node
Source code in src/momapy/core.py
self_angle
self_angle(
angle: float,
unit: Literal["degrees", "radians"] = "degrees",
) -> Point
Return the point on the border of the node that intersects the self drawing elements of the node with the line passing through the center anchor point of the node and at a given angle from the horizontal.
Source code in src/momapy/core.py
self_bbox
self_bbox() -> Bbox
Compute and return the bounding box of the self drawing element of the group layout
self_border
Return the point on the border of the node that intersects the self drawing elements of the node with the line formed of the center anchor point of the node and the given point. When there are multiple intersection points, the one closest to the given point is returned
Source code in src/momapy/core.py
self_children
self_children() -> list[LayoutElement]
Return the self children of the node. A node has unique child that is its label
self_drawing_elements
self_drawing_elements() -> list[DrawingElement]
Return the node's own drawing elements
Source code in src/momapy/core.py
self_to_shapely
Compute and return a shapely collection of geometries reproducing the self drawing elements of the group layout
size
south_east
south_east() -> Point
Return the south east anchor of the node
Source code in src/momapy/core.py
south_south_east
south_south_east() -> Point
Return the south south east anchor of the node
Source code in src/momapy/core.py
south_south_west
south_south_west() -> Point
Return the south south west anchor of the node
Source code in src/momapy/core.py
south_west
south_west() -> Point
Return the south west anchor of the node
Source code in src/momapy/core.py
to_shapely
Return a shapely collection of geometries reproducing the drawing elements of the layout element
Source code in src/momapy/core.py
west_north_west
west_north_west() -> Point
Return the west north west anchor of the node
Source code in src/momapy/core.py
west_south_west
west_south_west() -> Point
Return the west south west anchor of the node
Source code in src/momapy/core.py
BiologicalActivity
dataclass
BiologicalActivity(
*,
id_: str = make_uuid4_as_str(),
units_of_information: frozenset[
UnitOfInformation
] = frozenset(),
)
Bases: Activity
Class for biological activities
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id_
|
str
|
The id of the map element. This id is purely for the user to keep track of the element, it does not need to be unique and is not part of the identity of the element, i.e., it is not considered when testing for equality between two map elements or when hashing the map element |
'106b522e-be8f-442a-be23-fe62fbbcd99b'
|
units_of_information
|
frozenset[UnitOfInformation]
|
frozenset() -> empty frozenset object frozenset(iterable) -> frozenset object Build an immutable unordered collection of unique elements. |
<class 'frozenset'>
|
BiologicalActivityLayout
dataclass
BiologicalActivityLayout(
fill: NoneValueType | Color | None = white,
stroke: NoneValueType | Color | None = black,
stroke_width: float | None = 1.25,
*,
id_: str = make_uuid4_as_str(),
layout_elements: tuple[LayoutElement] = tuple(),
group_fill: NoneValueType | Color | None = None,
group_fill_rule: FillRule | None = None,
group_filter: NoneValueType | Filter | None = None,
group_font_family: str | None = None,
group_font_size: float | None = None,
group_font_style: FontStyle | None = None,
group_font_weight: FontWeight | float | None = None,
group_stroke: NoneValueType | Color | None = None,
group_stroke_dasharray: tuple[float, ...] | None = None,
group_stroke_dashoffset: float | None = None,
group_stroke_width: float | None = None,
group_text_anchor: TextAnchor | None = None,
group_transform: NoneValueType
| tuple[Transformation]
| None = None,
filter: NoneValueType | Filter | None = None,
height: float = 30.0,
label: TextLayout | None = None,
position: Point,
stroke_dasharray: tuple[float, ...] | None = None,
stroke_dashoffset: float | None = None,
transform: NoneValueType
| tuple[Transformation]
| None = None,
width: float = 60.0,
)
Bases: _SimpleMixin, SBGNNode
Class for biological activity layouts
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id_
|
str
|
The id of the map element. This id is purely for the user to keep track of the element, it does not need to be unique and is not part of the identity of the element, i.e., it is not considered when testing for equality between two map elements or when hashing the map element |
'882d7631-8fdc-413e-bb3a-55111a7dd90a'
|
layout_elements
|
tuple[LayoutElement]
|
The sub-layout elements of the group layout. These are part of the children of the group layout |
<dynamic>
|
group_fill
|
NoneValueType | Color | None
|
The fill color of the group layout |
None
|
group_fill_rule
|
FillRule | None
|
The fill rule of the group layout |
None
|
group_filter
|
NoneValueType | Filter | None
|
The filter of the group layout |
None
|
group_font_family
|
str | None
|
The font family of the group layout |
None
|
group_font_size
|
float | None
|
The font size of the group layout |
None
|
group_font_style
|
FontStyle | None
|
The font style of the group layout |
None
|
group_font_weight
|
FontWeight | float | None
|
The font weight of the group layout |
None
|
group_stroke
|
NoneValueType | Color | None
|
The stroke color of the group layout |
None
|
group_stroke_dasharray
|
tuple[float, ...] | None
|
The stroke dasharray of the group layout |
None
|
group_stroke_dashoffset
|
float | None
|
The stroke dashoffset of the group layout |
None
|
group_stroke_width
|
float | None
|
The stroke width of the group layout |
None
|
group_text_anchor
|
TextAnchor | None
|
The text anchor of the group layout |
None
|
group_transform
|
NoneValueType | tuple[Transformation] | None
|
The transform of the group layout |
None
|
fill
|
NoneValueType | Color | None
|
|
Color(red=255, green=255, blue=255, alpha=1.0)
|
filter
|
NoneValueType | Filter | None
|
The filter of the node |
None
|
height
|
float
|
|
30.0
|
label
|
TextLayout | None
|
The label of the node |
None
|
position
|
Point
|
The position of the node |
required |
stroke
|
NoneValueType | Color | None
|
|
Color(red=0, green=0, blue=0, alpha=1.0)
|
stroke_dasharray
|
tuple[float, ...] | None
|
The stroke dasharray of the node |
None
|
stroke_dashoffset
|
float | None
|
The stroke dashoffset of the node |
None
|
stroke_width
|
float | None
|
|
1.25
|
transform
|
NoneValueType | tuple[Transformation] | None
|
The transform of the node |
None
|
width
|
float
|
|
60.0
|
Methods:
| Name | Description |
|---|---|
anchor_point |
Return an anchor point of the layout element |
angle |
Return the point on the border of the node that intersects the drawing elements of the node with the line passing through the center anchor point of the node and at a given angle from the horizontal. |
bbox |
Compute and return the bounding box of the group layout element |
border |
Return the point on the border of the node that intersects the drawing elements of the node with the line formed of the center anchor point of the node and the given point. |
center |
Return the center anchor of the node |
childless |
Return a copy of the node with no children |
children |
Return the children of the group layout. |
contains |
Return |
descendants |
Return the descendants of the layout element |
drawing_elements |
Return the drawing elements of the group layout. |
east |
Return the east anchor of the node |
east_north_east |
Return the east north east anchor of the node |
east_south_east |
Return the east south east west anchor of the node |
equals |
Return |
flattened |
Return a list containing copy of the layout element with no children and all its descendants with no children |
label_center |
Return the label center anchor of the node |
north |
Return the north anchor of the node |
north_east |
Return the north east anchor of the node |
north_north_east |
Return the north north east anchor of the node |
north_north_west |
Return the north north west anchor of the node |
north_west |
Return the north west anchor of the node |
self_angle |
Return the point on the border of the node that intersects the self drawing elements of the node with the line passing through the center anchor point of the node and at a given angle from the horizontal. |
self_bbox |
Compute and return the bounding box of the self drawing element of the group layout |
self_border |
Return the point on the border of the node that intersects the self drawing elements of the node with the line formed of the center anchor point of the node and the given point. |
self_children |
Return the self children of the node. A node has unique child that is its label |
self_drawing_elements |
Return the node's own drawing elements |
self_to_shapely |
Compute and return a shapely collection of geometries reproducing the self drawing elements of the group layout |
size |
Return the size of the node |
south |
Return the south anchor of the node |
south_east |
Return the south east anchor of the node |
south_south_east |
Return the south south east anchor of the node |
south_south_west |
Return the south south west anchor of the node |
south_west |
Return the south west anchor of the node |
to_shapely |
Return a shapely collection of geometries reproducing the drawing elements of the layout element |
west |
Return the west anchor of the node |
west_north_west |
Return the west north west anchor of the node |
west_south_west |
Return the west south west anchor of the node |
Attributes:
| Name | Type | Description |
|---|---|---|
x |
float
|
Return the x coordinate of the node |
y |
float
|
Return the y coordinate of the node |
anchor_point
anchor_point(anchor_name: str) -> Point
angle
angle(
angle: float,
unit: Literal["degrees", "radians"] = "degrees",
) -> Point
Return the point on the border of the node that intersects the drawing elements of the node with the line passing through the center anchor point of the node and at a given angle from the horizontal.
Source code in src/momapy/core.py
bbox
bbox() -> Bbox
Compute and return the bounding box of the group layout element
Source code in src/momapy/core.py
border
Return the point on the border of the node that intersects the drawing elements of the node with the line formed of the center anchor point of the node and the given point. When there are multiple intersection points, the one closest to the given point is returned
Source code in src/momapy/core.py
center
center() -> Point
childless
children
children() -> list[LayoutElement]
Return the children of the group layout.
These are the self children of the group layout (returned by the self_children method) and the other children of the group layout (given by the layout_elements attribute)
Source code in src/momapy/core.py
contains
contains(other: LayoutElement) -> bool
Return true if another layout element is a descendant of the layout element, false otherwise
drawing_elements
drawing_elements() -> list[DrawingElement]
Return the drawing elements of the group layout. The returned drawing elements are a group drawing element formed of the self drawing elements of the group layout and the drawing elements of its children
Source code in src/momapy/core.py
east
east() -> Point
east_north_east
east_north_east() -> Point
Return the east north east anchor of the node
Source code in src/momapy/core.py
east_south_east
east_south_east() -> Point
Return the east south east west anchor of the node
Source code in src/momapy/core.py
equals
equals(
other: LayoutElement,
flattened: bool = False,
unordered: bool = False,
) -> bool
Return true if the layout element is equal to another layout element, false otherwise
Source code in src/momapy/core.py
flattened
flattened() -> list[LayoutElement]
Return a list containing copy of the layout element with no children and all its descendants with no children
Source code in src/momapy/core.py
label_center
label_center() -> Point
north
north() -> Point
north_east
north_east() -> Point
Return the north east anchor of the node
Source code in src/momapy/core.py
north_north_east
north_north_east() -> Point
Return the north north east anchor of the node
Source code in src/momapy/core.py
north_north_west
north_north_west() -> Point
Return the north north west anchor of the node
Source code in src/momapy/core.py
north_west
north_west() -> Point
Return the north west anchor of the node
Source code in src/momapy/core.py
self_angle
self_angle(
angle: float,
unit: Literal["degrees", "radians"] = "degrees",
) -> Point
Return the point on the border of the node that intersects the self drawing elements of the node with the line passing through the center anchor point of the node and at a given angle from the horizontal.
Source code in src/momapy/core.py
self_bbox
self_bbox() -> Bbox
Compute and return the bounding box of the self drawing element of the group layout
self_border
Return the point on the border of the node that intersects the self drawing elements of the node with the line formed of the center anchor point of the node and the given point. When there are multiple intersection points, the one closest to the given point is returned
Source code in src/momapy/core.py
self_children
self_children() -> list[LayoutElement]
Return the self children of the node. A node has unique child that is its label
self_drawing_elements
self_drawing_elements() -> list[DrawingElement]
Return the node's own drawing elements
Source code in src/momapy/core.py
self_to_shapely
Compute and return a shapely collection of geometries reproducing the self drawing elements of the group layout
size
south
south() -> Point
south_east
south_east() -> Point
Return the south east anchor of the node
Source code in src/momapy/core.py
south_south_east
south_south_east() -> Point
Return the south south east anchor of the node
Source code in src/momapy/core.py
south_south_west
south_south_west() -> Point
Return the south south west anchor of the node
Source code in src/momapy/core.py
south_west
south_west() -> Point
Return the south west anchor of the node
Source code in src/momapy/core.py
to_shapely
Return a shapely collection of geometries reproducing the drawing elements of the layout element
Source code in src/momapy/core.py
west
west() -> Point
west_north_west
west_north_west() -> Point
Return the west north west anchor of the node
Source code in src/momapy/core.py
west_south_west
west_south_west() -> Point
Return the west south west anchor of the node
Source code in src/momapy/core.py
Compartment
dataclass
Bases: SBGNModelElement
Class for compartments
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id_
|
str
|
The id of the map element. This id is purely for the user to keep track of the element, it does not need to be unique and is not part of the identity of the element, i.e., it is not considered when testing for equality between two map elements or when hashing the map element |
'12a033a0-ccb7-4718-83a7-4fe154c1b566'
|
label
|
str | None
|
|
None
|
CompartmentLayout
dataclass
CompartmentLayout(
fill: NoneValueType | Color | None = white,
stroke: NoneValueType | Color | None = black,
stroke_width: float | None = 1.25,
*,
id_: str = make_uuid4_as_str(),
layout_elements: tuple[LayoutElement] = tuple(),
group_fill: NoneValueType | Color | None = None,
group_fill_rule: FillRule | None = None,
group_filter: NoneValueType | Filter | None = None,
group_font_family: str | None = None,
group_font_size: float | None = None,
group_font_style: FontStyle | None = None,
group_font_weight: FontWeight | float | None = None,
group_stroke: NoneValueType | Color | None = None,
group_stroke_dasharray: tuple[float, ...] | None = None,
group_stroke_dashoffset: float | None = None,
group_stroke_width: float | None = None,
group_text_anchor: TextAnchor | None = None,
group_transform: NoneValueType
| tuple[Transformation]
| None = None,
filter: NoneValueType | Filter | None = None,
height: float = 80.0,
label: TextLayout | None = None,
position: Point,
stroke_dasharray: tuple[float, ...] | None = None,
stroke_dashoffset: float | None = None,
transform: NoneValueType
| tuple[Transformation]
| None = None,
width: float = 80.0,
rounded_corners: float = 5.0,
border_stroke_width: float | None = 3.25,
)
Bases: _SimpleMixin, SBGNNode
Class for compartment layouts
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id_
|
str
|
The id of the map element. This id is purely for the user to keep track of the element, it does not need to be unique and is not part of the identity of the element, i.e., it is not considered when testing for equality between two map elements or when hashing the map element |
'222ed3ff-d902-4797-a94f-076b516232dc'
|
layout_elements
|
tuple[LayoutElement]
|
The sub-layout elements of the group layout. These are part of the children of the group layout |
<dynamic>
|
group_fill
|
NoneValueType | Color | None
|
The fill color of the group layout |
None
|
group_fill_rule
|
FillRule | None
|
The fill rule of the group layout |
None
|
group_filter
|
NoneValueType | Filter | None
|
The filter of the group layout |
None
|
group_font_family
|
str | None
|
The font family of the group layout |
None
|
group_font_size
|
float | None
|
The font size of the group layout |
None
|
group_font_style
|
FontStyle | None
|
The font style of the group layout |
None
|
group_font_weight
|
FontWeight | float | None
|
The font weight of the group layout |
None
|
group_stroke
|
NoneValueType | Color | None
|
The stroke color of the group layout |
None
|
group_stroke_dasharray
|
tuple[float, ...] | None
|
The stroke dasharray of the group layout |
None
|
group_stroke_dashoffset
|
float | None
|
The stroke dashoffset of the group layout |
None
|
group_stroke_width
|
float | None
|
The stroke width of the group layout |
None
|
group_text_anchor
|
TextAnchor | None
|
The text anchor of the group layout |
None
|
group_transform
|
NoneValueType | tuple[Transformation] | None
|
The transform of the group layout |
None
|
fill
|
NoneValueType | Color | None
|
|
Color(red=255, green=255, blue=255, alpha=1.0)
|
filter
|
NoneValueType | Filter | None
|
The filter of the node |
None
|
height
|
float
|
|
80.0
|
label
|
TextLayout | None
|
The label of the node |
None
|
position
|
Point
|
The position of the node |
required |
stroke
|
NoneValueType | Color | None
|
|
Color(red=0, green=0, blue=0, alpha=1.0)
|
stroke_dasharray
|
tuple[float, ...] | None
|
The stroke dasharray of the node |
None
|
stroke_dashoffset
|
float | None
|
The stroke dashoffset of the node |
None
|
stroke_width
|
float | None
|
|
1.25
|
transform
|
NoneValueType | tuple[Transformation] | None
|
The transform of the node |
None
|
width
|
float
|
|
80.0
|
rounded_corners
|
float
|
|
5.0
|
border_stroke_width
|
float | None
|
|
3.25
|
Methods:
| Name | Description |
|---|---|
anchor_point |
Return an anchor point of the layout element |
angle |
Return the point on the border of the node that intersects the drawing elements of the node with the line passing through the center anchor point of the node and at a given angle from the horizontal. |
bbox |
Compute and return the bounding box of the group layout element |
border |
Return the point on the border of the node that intersects the drawing elements of the node with the line formed of the center anchor point of the node and the given point. |
center |
Return the center anchor of the node |
childless |
Return a copy of the node with no children |
children |
Return the children of the group layout. |
contains |
Return |
descendants |
Return the descendants of the layout element |
drawing_elements |
Return the drawing elements of the group layout. |
east |
Return the east anchor of the node |
east_north_east |
Return the east north east anchor of the node |
east_south_east |
Return the east south east west anchor of the node |
equals |
Return |
flattened |
Return a list containing copy of the layout element with no children and all its descendants with no children |
label_center |
Return the label center anchor of the node |
north |
Return the north anchor of the node |
north_east |
Return the north east anchor of the node |
north_north_east |
Return the north north east anchor of the node |
north_north_west |
Return the north north west anchor of the node |
north_west |
Return the north west anchor of the node |
self_angle |
Return the point on the border of the node that intersects the self drawing elements of the node with the line passing through the center anchor point of the node and at a given angle from the horizontal. |
self_bbox |
Compute and return the bounding box of the self drawing element of the group layout |
self_border |
Return the point on the border of the node that intersects the self drawing elements of the node with the line formed of the center anchor point of the node and the given point. |
self_children |
Return the self children of the node. A node has unique child that is its label |
self_drawing_elements |
Return the node's own drawing elements |
self_to_shapely |
Compute and return a shapely collection of geometries reproducing the self drawing elements of the group layout |
size |
Return the size of the node |
south |
Return the south anchor of the node |
south_east |
Return the south east anchor of the node |
south_south_east |
Return the south south east anchor of the node |
south_south_west |
Return the south south west anchor of the node |
south_west |
Return the south west anchor of the node |
to_shapely |
Return a shapely collection of geometries reproducing the drawing elements of the layout element |
west |
Return the west anchor of the node |
west_north_west |
Return the west north west anchor of the node |
west_south_west |
Return the west south west anchor of the node |
Attributes:
| Name | Type | Description |
|---|---|---|
x |
float
|
Return the x coordinate of the node |
y |
float
|
Return the y coordinate of the node |
anchor_point
anchor_point(anchor_name: str) -> Point
angle
angle(
angle: float,
unit: Literal["degrees", "radians"] = "degrees",
) -> Point
Return the point on the border of the node that intersects the drawing elements of the node with the line passing through the center anchor point of the node and at a given angle from the horizontal.
Source code in src/momapy/core.py
bbox
bbox() -> Bbox
Compute and return the bounding box of the group layout element
Source code in src/momapy/core.py
border
Return the point on the border of the node that intersects the drawing elements of the node with the line formed of the center anchor point of the node and the given point. When there are multiple intersection points, the one closest to the given point is returned
Source code in src/momapy/core.py
center
center() -> Point
childless
children
children() -> list[LayoutElement]
Return the children of the group layout.
These are the self children of the group layout (returned by the self_children method) and the other children of the group layout (given by the layout_elements attribute)
Source code in src/momapy/core.py
contains
contains(other: LayoutElement) -> bool
Return true if another layout element is a descendant of the layout element, false otherwise
drawing_elements
drawing_elements() -> list[DrawingElement]
Return the drawing elements of the group layout. The returned drawing elements are a group drawing element formed of the self drawing elements of the group layout and the drawing elements of its children
Source code in src/momapy/core.py
east
east() -> Point
east_north_east
east_north_east() -> Point
Return the east north east anchor of the node
Source code in src/momapy/core.py
east_south_east
east_south_east() -> Point
Return the east south east west anchor of the node
Source code in src/momapy/core.py
equals
equals(
other: LayoutElement,
flattened: bool = False,
unordered: bool = False,
) -> bool
Return true if the layout element is equal to another layout element, false otherwise
Source code in src/momapy/core.py
flattened
flattened() -> list[LayoutElement]
Return a list containing copy of the layout element with no children and all its descendants with no children
Source code in src/momapy/core.py
label_center
label_center() -> Point
north
north() -> Point
north_east
north_east() -> Point
Return the north east anchor of the node
Source code in src/momapy/core.py
north_north_east
north_north_east() -> Point
Return the north north east anchor of the node
Source code in src/momapy/core.py
north_north_west
north_north_west() -> Point
Return the north north west anchor of the node
Source code in src/momapy/core.py
north_west
north_west() -> Point
Return the north west anchor of the node
Source code in src/momapy/core.py
self_angle
self_angle(
angle: float,
unit: Literal["degrees", "radians"] = "degrees",
) -> Point
Return the point on the border of the node that intersects the self drawing elements of the node with the line passing through the center anchor point of the node and at a given angle from the horizontal.
Source code in src/momapy/core.py
self_bbox
self_bbox() -> Bbox
Compute and return the bounding box of the self drawing element of the group layout
self_border
Return the point on the border of the node that intersects the self drawing elements of the node with the line formed of the center anchor point of the node and the given point. When there are multiple intersection points, the one closest to the given point is returned
Source code in src/momapy/core.py
self_children
self_children() -> list[LayoutElement]
Return the self children of the node. A node has unique child that is its label
self_drawing_elements
self_drawing_elements() -> list[DrawingElement]
Return the node's own drawing elements
Source code in src/momapy/core.py
self_to_shapely
Compute and return a shapely collection of geometries reproducing the self drawing elements of the group layout
size
south
south() -> Point
south_east
south_east() -> Point
Return the south east anchor of the node
Source code in src/momapy/core.py
south_south_east
south_south_east() -> Point
Return the south south east anchor of the node
Source code in src/momapy/core.py
south_south_west
south_south_west() -> Point
Return the south south west anchor of the node
Source code in src/momapy/core.py
south_west
south_west() -> Point
Return the south west anchor of the node
Source code in src/momapy/core.py
to_shapely
Return a shapely collection of geometries reproducing the drawing elements of the layout element
Source code in src/momapy/core.py
west
west() -> Point
west_north_west
west_north_west() -> Point
Return the west north west anchor of the node
Source code in src/momapy/core.py
west_south_west
west_south_west() -> Point
Return the west south west anchor of the node
Source code in src/momapy/core.py
ComplexUnitOfInformation
dataclass
Bases: UnitOfInformation
Class for complex units of information
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id_
|
str
|
The id of the map element. This id is purely for the user to keep track of the element, it does not need to be unique and is not part of the identity of the element, i.e., it is not considered when testing for equality between two map elements or when hashing the map element |
'8d4a7562-4216-4fc6-82cc-80e4a2a9765f'
|
label
|
str | None
|
|
None
|
ComplexUnitOfInformationLayout
dataclass
ComplexUnitOfInformationLayout(
fill: NoneValueType | Color | None = white,
stroke: NoneValueType | Color | None = black,
stroke_width: float | None = 1.25,
*,
id_: str = make_uuid4_as_str(),
layout_elements: tuple[LayoutElement] = tuple(),
group_fill: NoneValueType | Color | None = None,
group_fill_rule: FillRule | None = None,
group_filter: NoneValueType | Filter | None = None,
group_font_family: str | None = None,
group_font_size: float | None = None,
group_font_style: FontStyle | None = None,
group_font_weight: FontWeight | float | None = None,
group_stroke: NoneValueType | Color | None = None,
group_stroke_dasharray: tuple[float, ...] | None = None,
group_stroke_dashoffset: float | None = None,
group_stroke_width: float | None = None,
group_text_anchor: TextAnchor | None = None,
group_transform: NoneValueType
| tuple[Transformation]
| None = None,
filter: NoneValueType | Filter | None = None,
height: float = 12.0,
label: TextLayout | None = None,
position: Point,
stroke_dasharray: tuple[float, ...] | None = None,
stroke_dashoffset: float | None = None,
transform: NoneValueType
| tuple[Transformation]
| None = None,
width: float = 12.0,
cut_corners: float = 5.0,
)
Bases: _SimpleMixin, SBGNNode
Class for complex unit of information layouts
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id_
|
str
|
The id of the map element. This id is purely for the user to keep track of the element, it does not need to be unique and is not part of the identity of the element, i.e., it is not considered when testing for equality between two map elements or when hashing the map element |
'bacfea8a-8cf4-449e-8899-015d8e62b7b3'
|
layout_elements
|
tuple[LayoutElement]
|
The sub-layout elements of the group layout. These are part of the children of the group layout |
<dynamic>
|
group_fill
|
NoneValueType | Color | None
|
The fill color of the group layout |
None
|
group_fill_rule
|
FillRule | None
|
The fill rule of the group layout |
None
|
group_filter
|
NoneValueType | Filter | None
|
The filter of the group layout |
None
|
group_font_family
|
str | None
|
The font family of the group layout |
None
|
group_font_size
|
float | None
|
The font size of the group layout |
None
|
group_font_style
|
FontStyle | None
|
The font style of the group layout |
None
|
group_font_weight
|
FontWeight | float | None
|
The font weight of the group layout |
None
|
group_stroke
|
NoneValueType | Color | None
|
The stroke color of the group layout |
None
|
group_stroke_dasharray
|
tuple[float, ...] | None
|
The stroke dasharray of the group layout |
None
|
group_stroke_dashoffset
|
float | None
|
The stroke dashoffset of the group layout |
None
|
group_stroke_width
|
float | None
|
The stroke width of the group layout |
None
|
group_text_anchor
|
TextAnchor | None
|
The text anchor of the group layout |
None
|
group_transform
|
NoneValueType | tuple[Transformation] | None
|
The transform of the group layout |
None
|
fill
|
NoneValueType | Color | None
|
|
Color(red=255, green=255, blue=255, alpha=1.0)
|
filter
|
NoneValueType | Filter | None
|
The filter of the node |
None
|
height
|
float
|
|
12.0
|
label
|
TextLayout | None
|
The label of the node |
None
|
position
|
Point
|
The position of the node |
required |
stroke
|
NoneValueType | Color | None
|
|
Color(red=0, green=0, blue=0, alpha=1.0)
|
stroke_dasharray
|
tuple[float, ...] | None
|
The stroke dasharray of the node |
None
|
stroke_dashoffset
|
float | None
|
The stroke dashoffset of the node |
None
|
stroke_width
|
float | None
|
|
1.25
|
transform
|
NoneValueType | tuple[Transformation] | None
|
The transform of the node |
None
|
width
|
float
|
|
12.0
|
cut_corners
|
float
|
|
5.0
|
Methods:
| Name | Description |
|---|---|
anchor_point |
Return an anchor point of the layout element |
angle |
Return the point on the border of the node that intersects the drawing elements of the node with the line passing through the center anchor point of the node and at a given angle from the horizontal. |
bbox |
Compute and return the bounding box of the group layout element |
border |
Return the point on the border of the node that intersects the drawing elements of the node with the line formed of the center anchor point of the node and the given point. |
center |
Return the center anchor of the node |
childless |
Return a copy of the node with no children |
children |
Return the children of the group layout. |
contains |
Return |
descendants |
Return the descendants of the layout element |
drawing_elements |
Return the drawing elements of the group layout. |
east |
Return the east anchor of the node |
east_north_east |
Return the east north east anchor of the node |
east_south_east |
Return the east south east west anchor of the node |
equals |
Return |
flattened |
Return a list containing copy of the layout element with no children and all its descendants with no children |
label_center |
Return the label center anchor of the node |
north |
Return the north anchor of the node |
north_east |
Return the north east anchor of the node |
north_north_east |
Return the north north east anchor of the node |
north_north_west |
Return the north north west anchor of the node |
north_west |
Return the north west anchor of the node |
self_angle |
Return the point on the border of the node that intersects the self drawing elements of the node with the line passing through the center anchor point of the node and at a given angle from the horizontal. |
self_bbox |
Compute and return the bounding box of the self drawing element of the group layout |
self_border |
Return the point on the border of the node that intersects the self drawing elements of the node with the line formed of the center anchor point of the node and the given point. |
self_children |
Return the self children of the node. A node has unique child that is its label |
self_drawing_elements |
Return the node's own drawing elements |
self_to_shapely |
Compute and return a shapely collection of geometries reproducing the self drawing elements of the group layout |
size |
Return the size of the node |
south |
Return the south anchor of the node |
south_east |
Return the south east anchor of the node |
south_south_east |
Return the south south east anchor of the node |
south_south_west |
Return the south south west anchor of the node |
south_west |
Return the south west anchor of the node |
to_shapely |
Return a shapely collection of geometries reproducing the drawing elements of the layout element |
west |
Return the west anchor of the node |
west_north_west |
Return the west north west anchor of the node |
west_south_west |
Return the west south west anchor of the node |
Attributes:
| Name | Type | Description |
|---|---|---|
x |
float
|
Return the x coordinate of the node |
y |
float
|
Return the y coordinate of the node |
anchor_point
anchor_point(anchor_name: str) -> Point
angle
angle(
angle: float,
unit: Literal["degrees", "radians"] = "degrees",
) -> Point
Return the point on the border of the node that intersects the drawing elements of the node with the line passing through the center anchor point of the node and at a given angle from the horizontal.
Source code in src/momapy/core.py
bbox
bbox() -> Bbox
Compute and return the bounding box of the group layout element
Source code in src/momapy/core.py
border
Return the point on the border of the node that intersects the drawing elements of the node with the line formed of the center anchor point of the node and the given point. When there are multiple intersection points, the one closest to the given point is returned
Source code in src/momapy/core.py
center
center() -> Point
childless
children
children() -> list[LayoutElement]
Return the children of the group layout.
These are the self children of the group layout (returned by the self_children method) and the other children of the group layout (given by the layout_elements attribute)
Source code in src/momapy/core.py
contains
contains(other: LayoutElement) -> bool
Return true if another layout element is a descendant of the layout element, false otherwise
drawing_elements
drawing_elements() -> list[DrawingElement]
Return the drawing elements of the group layout. The returned drawing elements are a group drawing element formed of the self drawing elements of the group layout and the drawing elements of its children
Source code in src/momapy/core.py
east
east() -> Point
east_north_east
east_north_east() -> Point
Return the east north east anchor of the node
Source code in src/momapy/core.py
east_south_east
east_south_east() -> Point
Return the east south east west anchor of the node
Source code in src/momapy/core.py
equals
equals(
other: LayoutElement,
flattened: bool = False,
unordered: bool = False,
) -> bool
Return true if the layout element is equal to another layout element, false otherwise
Source code in src/momapy/core.py
flattened
flattened() -> list[LayoutElement]
Return a list containing copy of the layout element with no children and all its descendants with no children
Source code in src/momapy/core.py
label_center
label_center() -> Point
north
north() -> Point
north_east
north_east() -> Point
Return the north east anchor of the node
Source code in src/momapy/core.py
north_north_east
north_north_east() -> Point
Return the north north east anchor of the node
Source code in src/momapy/core.py
north_north_west
north_north_west() -> Point
Return the north north west anchor of the node
Source code in src/momapy/core.py
north_west
north_west() -> Point
Return the north west anchor of the node
Source code in src/momapy/core.py
self_angle
self_angle(
angle: float,
unit: Literal["degrees", "radians"] = "degrees",
) -> Point
Return the point on the border of the node that intersects the self drawing elements of the node with the line passing through the center anchor point of the node and at a given angle from the horizontal.
Source code in src/momapy/core.py
self_bbox
self_bbox() -> Bbox
Compute and return the bounding box of the self drawing element of the group layout
self_border
Return the point on the border of the node that intersects the self drawing elements of the node with the line formed of the center anchor point of the node and the given point. When there are multiple intersection points, the one closest to the given point is returned
Source code in src/momapy/core.py
self_children
self_children() -> list[LayoutElement]
Return the self children of the node. A node has unique child that is its label
self_drawing_elements
self_drawing_elements() -> list[DrawingElement]
Return the node's own drawing elements
Source code in src/momapy/core.py
self_to_shapely
Compute and return a shapely collection of geometries reproducing the self drawing elements of the group layout
size
south
south() -> Point
south_east
south_east() -> Point
Return the south east anchor of the node
Source code in src/momapy/core.py
south_south_east
south_south_east() -> Point
Return the south south east anchor of the node
Source code in src/momapy/core.py
south_south_west
south_south_west() -> Point
Return the south south west anchor of the node
Source code in src/momapy/core.py
south_west
south_west() -> Point
Return the south west anchor of the node
Source code in src/momapy/core.py
to_shapely
Return a shapely collection of geometries reproducing the drawing elements of the layout element
Source code in src/momapy/core.py
west
west() -> Point
west_north_west
west_north_west() -> Point
Return the west north west anchor of the node
Source code in src/momapy/core.py
west_south_west
west_south_west() -> Point
Return the west south west anchor of the node
Source code in src/momapy/core.py
DelayOperator
dataclass
DelayOperator(
*,
id_: str = make_uuid4_as_str(),
inputs: frozenset[LogicalOperatorInput] = frozenset(),
)
Bases: LogicalOperator
Class for delay operators
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id_
|
str
|
The id of the map element. This id is purely for the user to keep track of the element, it does not need to be unique and is not part of the identity of the element, i.e., it is not considered when testing for equality between two map elements or when hashing the map element |
'b8265aac-40ab-477a-b7ab-b0bebd4de257'
|
inputs
|
frozenset[LogicalOperatorInput]
|
frozenset() -> empty frozenset object frozenset(iterable) -> frozenset object Build an immutable unordered collection of unique elements. |
<class 'frozenset'>
|
DelayOperatorLayout
dataclass
DelayOperatorLayout(
fill: NoneValueType | Color | None = white,
stroke: NoneValueType | Color | None = black,
stroke_width: float | None = 1.25,
*,
id_: str = make_uuid4_as_str(),
layout_elements: tuple[LayoutElement] = tuple(),
group_fill: NoneValueType | Color | None = None,
group_fill_rule: FillRule | None = None,
group_filter: NoneValueType | Filter | None = None,
group_font_family: str | None = None,
group_font_size: float | None = None,
group_font_style: FontStyle | None = None,
group_font_weight: FontWeight | float | None = None,
group_stroke: NoneValueType | Color | None = None,
group_stroke_dasharray: tuple[float, ...] | None = None,
group_stroke_dashoffset: float | None = None,
group_stroke_width: float | None = None,
group_text_anchor: TextAnchor | None = None,
group_transform: NoneValueType
| tuple[Transformation]
| None = None,
filter: NoneValueType | Filter | None = None,
height: float = 30.0,
label: TextLayout | None = None,
position: Point,
stroke_dasharray: tuple[float, ...] | None = None,
stroke_dashoffset: float | None = None,
transform: NoneValueType
| tuple[Transformation]
| None = None,
width: float = 30.0,
direction: Direction = HORIZONTAL,
left_to_right: bool = True,
left_connector_length: float = 10.0,
right_connector_length: float = 10.0,
left_connector_stroke: NoneValueType
| Color
| None = None,
left_connector_stroke_width: float | None = None,
left_connector_stroke_dasharray: NoneValueType
| tuple[float]
| None = None,
left_connector_stroke_dashoffset: float | None = None,
left_connector_fill: NoneValueType
| Color
| None = None,
left_connector_transform: NoneValueType
| tuple[Transformation]
| None = None,
left_connector_filter: NoneValueType
| Filter
| None = None,
right_connector_stroke: NoneValueType
| Color
| None = None,
right_connector_stroke_width: float | None = None,
right_connector_stroke_dasharray: NoneValueType
| tuple[float]
| None = None,
right_connector_stroke_dashoffset: float | None = None,
right_connector_fill: NoneValueType
| Color
| None = None,
right_connector_transform: NoneValueType
| tuple[Transformation]
| None = None,
right_connector_filter: NoneValueType
| Filter
| None = None,
)
Bases: _ConnectorsMixin, _SimpleMixin, _TextMixin, SBGNNode
Class for delay operator layouts
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id_
|
str
|
The id of the map element. This id is purely for the user to keep track of the element, it does not need to be unique and is not part of the identity of the element, i.e., it is not considered when testing for equality between two map elements or when hashing the map element |
'6b025d72-d831-45f9-9fcc-ff416a7690a9'
|
layout_elements
|
tuple[LayoutElement]
|
The sub-layout elements of the group layout. These are part of the children of the group layout |
<dynamic>
|
group_fill
|
NoneValueType | Color | None
|
The fill color of the group layout |
None
|
group_fill_rule
|
FillRule | None
|
The fill rule of the group layout |
None
|
group_filter
|
NoneValueType | Filter | None
|
The filter of the group layout |
None
|
group_font_family
|
str | None
|
The font family of the group layout |
None
|
group_font_size
|
float | None
|
The font size of the group layout |
None
|
group_font_style
|
FontStyle | None
|
The font style of the group layout |
None
|
group_font_weight
|
FontWeight | float | None
|
The font weight of the group layout |
None
|
group_stroke
|
NoneValueType | Color | None
|
The stroke color of the group layout |
None
|
group_stroke_dasharray
|
tuple[float, ...] | None
|
The stroke dasharray of the group layout |
None
|
group_stroke_dashoffset
|
float | None
|
The stroke dashoffset of the group layout |
None
|
group_stroke_width
|
float | None
|
The stroke width of the group layout |
None
|
group_text_anchor
|
TextAnchor | None
|
The text anchor of the group layout |
None
|
group_transform
|
NoneValueType | tuple[Transformation] | None
|
The transform of the group layout |
None
|
fill
|
NoneValueType | Color | None
|
|
Color(red=255, green=255, blue=255, alpha=1.0)
|
filter
|
NoneValueType | Filter | None
|
The filter of the node |
None
|
height
|
float
|
|
30.0
|
label
|
TextLayout | None
|
The label of the node |
None
|
position
|
Point
|
The position of the node |
required |
stroke
|
NoneValueType | Color | None
|
|
Color(red=0, green=0, blue=0, alpha=1.0)
|
stroke_dasharray
|
tuple[float, ...] | None
|
The stroke dasharray of the node |
None
|
stroke_dashoffset
|
float | None
|
The stroke dashoffset of the node |
None
|
stroke_width
|
float | None
|
|
1.25
|
transform
|
NoneValueType | tuple[Transformation] | None
|
The transform of the node |
None
|
width
|
float
|
|
30.0
|
direction
|
Direction
|
|
<Direction.HORIZONTAL: 1>
|
left_to_right
|
bool
|
|
True
|
left_connector_length
|
float
|
|
10.0
|
right_connector_length
|
float
|
|
10.0
|
left_connector_stroke
|
NoneValueType | Color | None
|
|
None
|
left_connector_stroke_width
|
float | None
|
|
None
|
left_connector_stroke_dasharray
|
NoneValueType | tuple[float] | None
|
|
None
|
left_connector_stroke_dashoffset
|
float | None
|
|
None
|
left_connector_fill
|
NoneValueType | Color | None
|
|
None
|
left_connector_transform
|
NoneValueType | tuple[Transformation] | None
|
|
None
|
left_connector_filter
|
NoneValueType | Filter | None
|
|
None
|
right_connector_stroke
|
NoneValueType | Color | None
|
|
None
|
right_connector_stroke_width
|
float | None
|
|
None
|
right_connector_stroke_dasharray
|
NoneValueType | tuple[float] | None
|
|
None
|
right_connector_stroke_dashoffset
|
float | None
|
|
None
|
right_connector_fill
|
NoneValueType | Color | None
|
|
None
|
right_connector_transform
|
NoneValueType | tuple[Transformation] | None
|
|
None
|
right_connector_filter
|
NoneValueType | Filter | None
|
|
None
|
Methods:
| Name | Description |
|---|---|
anchor_point |
Return an anchor point of the layout element |
angle |
Return the point on the border of the node that intersects the drawing elements of the node with the line passing through the center anchor point of the node and at a given angle from the horizontal. |
bbox |
Compute and return the bounding box of the group layout element |
border |
Return the point on the border of the node that intersects the drawing elements of the node with the line formed of the center anchor point of the node and the given point. |
center |
Return the center anchor of the node |
childless |
Return a copy of the node with no children |
children |
Return the children of the group layout. |
contains |
Return |
descendants |
Return the descendants of the layout element |
drawing_elements |
Return the drawing elements of the group layout. |
east_north_east |
Return the east north east anchor of the node |
east_south_east |
Return the east south east west anchor of the node |
equals |
Return |
flattened |
Return a list containing copy of the layout element with no children and all its descendants with no children |
label_center |
Return the label center anchor of the node |
north_east |
Return the north east anchor of the node |
north_north_east |
Return the north north east anchor of the node |
north_north_west |
Return the north north west anchor of the node |
north_west |
Return the north west anchor of the node |
self_angle |
Return the point on the border of the node that intersects the self drawing elements of the node with the line passing through the center anchor point of the node and at a given angle from the horizontal. |
self_bbox |
Compute and return the bounding box of the self drawing element of the group layout |
self_border |
Return the point on the border of the node that intersects the self drawing elements of the node with the line formed of the center anchor point of the node and the given point. |
self_children |
Return the self children of the node. A node has unique child that is its label |
self_drawing_elements |
Return the node's own drawing elements |
self_to_shapely |
Compute and return a shapely collection of geometries reproducing the self drawing elements of the group layout |
size |
Return the size of the node |
south_east |
Return the south east anchor of the node |
south_south_east |
Return the south south east anchor of the node |
south_south_west |
Return the south south west anchor of the node |
south_west |
Return the south west anchor of the node |
to_shapely |
Return a shapely collection of geometries reproducing the drawing elements of the layout element |
west_north_west |
Return the west north west anchor of the node |
west_south_west |
Return the west south west anchor of the node |
Attributes:
| Name | Type | Description |
|---|---|---|
x |
float
|
Return the x coordinate of the node |
y |
float
|
Return the y coordinate of the node |
anchor_point
anchor_point(anchor_name: str) -> Point
angle
angle(
angle: float,
unit: Literal["degrees", "radians"] = "degrees",
) -> Point
Return the point on the border of the node that intersects the drawing elements of the node with the line passing through the center anchor point of the node and at a given angle from the horizontal.
Source code in src/momapy/core.py
bbox
bbox() -> Bbox
Compute and return the bounding box of the group layout element
Source code in src/momapy/core.py
border
Return the point on the border of the node that intersects the drawing elements of the node with the line formed of the center anchor point of the node and the given point. When there are multiple intersection points, the one closest to the given point is returned
Source code in src/momapy/core.py
center
center() -> Point
childless
children
children() -> list[LayoutElement]
Return the children of the group layout.
These are the self children of the group layout (returned by the self_children method) and the other children of the group layout (given by the layout_elements attribute)
Source code in src/momapy/core.py
contains
contains(other: LayoutElement) -> bool
Return true if another layout element is a descendant of the layout element, false otherwise
drawing_elements
drawing_elements() -> list[DrawingElement]
Return the drawing elements of the group layout. The returned drawing elements are a group drawing element formed of the self drawing elements of the group layout and the drawing elements of its children
Source code in src/momapy/core.py
east_north_east
east_north_east() -> Point
Return the east north east anchor of the node
Source code in src/momapy/core.py
east_south_east
east_south_east() -> Point
Return the east south east west anchor of the node
Source code in src/momapy/core.py
equals
equals(
other: LayoutElement,
flattened: bool = False,
unordered: bool = False,
) -> bool
Return true if the layout element is equal to another layout element, false otherwise
Source code in src/momapy/core.py
flattened
flattened() -> list[LayoutElement]
Return a list containing copy of the layout element with no children and all its descendants with no children
Source code in src/momapy/core.py
label_center
label_center() -> Point
north_east
north_east() -> Point
Return the north east anchor of the node
Source code in src/momapy/core.py
north_north_east
north_north_east() -> Point
Return the north north east anchor of the node
Source code in src/momapy/core.py
north_north_west
north_north_west() -> Point
Return the north north west anchor of the node
Source code in src/momapy/core.py
north_west
north_west() -> Point
Return the north west anchor of the node
Source code in src/momapy/core.py
self_angle
self_angle(
angle: float,
unit: Literal["degrees", "radians"] = "degrees",
) -> Point
Return the point on the border of the node that intersects the self drawing elements of the node with the line passing through the center anchor point of the node and at a given angle from the horizontal.
Source code in src/momapy/core.py
self_bbox
self_bbox() -> Bbox
Compute and return the bounding box of the self drawing element of the group layout
self_border
Return the point on the border of the node that intersects the self drawing elements of the node with the line formed of the center anchor point of the node and the given point. When there are multiple intersection points, the one closest to the given point is returned
Source code in src/momapy/core.py
self_children
self_children() -> list[LayoutElement]
Return the self children of the node. A node has unique child that is its label
self_drawing_elements
self_drawing_elements() -> list[DrawingElement]
Return the node's own drawing elements
Source code in src/momapy/core.py
self_to_shapely
Compute and return a shapely collection of geometries reproducing the self drawing elements of the group layout
size
south_east
south_east() -> Point
Return the south east anchor of the node
Source code in src/momapy/core.py
south_south_east
south_south_east() -> Point
Return the south south east anchor of the node
Source code in src/momapy/core.py
south_south_west
south_south_west() -> Point
Return the south south west anchor of the node
Source code in src/momapy/core.py
south_west
south_west() -> Point
Return the south west anchor of the node
Source code in src/momapy/core.py
to_shapely
Return a shapely collection of geometries reproducing the drawing elements of the layout element
Source code in src/momapy/core.py
west_north_west
west_north_west() -> Point
Return the west north west anchor of the node
Source code in src/momapy/core.py
west_south_west
west_south_west() -> Point
Return the west south west anchor of the node
Source code in src/momapy/core.py
EquivalenceArcLayout
dataclass
EquivalenceArcLayout(
path_fill: NoneValueType | Color | None = NoneValue,
path_stroke: NoneValueType | Color | None = black,
path_stroke_width: float | None = 1.25,
arrowhead_fill: NoneValueType | Color | None = white,
arrowhead_stroke: NoneValueType | Color | None = black,
arrowhead_stroke_width: float | None = 1.25,
*,
id_: str = make_uuid4_as_str(),
layout_elements: tuple[LayoutElement] = tuple(),
group_fill: NoneValueType | Color | None = None,
group_fill_rule: FillRule | None = None,
group_filter: NoneValueType | Filter | None = None,
group_font_family: str | None = None,
group_font_size: float | None = None,
group_font_style: FontStyle | None = None,
group_font_weight: FontWeight | float | None = None,
group_stroke: NoneValueType | Color | None = None,
group_stroke_dasharray: tuple[float, ...] | None = None,
group_stroke_dashoffset: float | None = None,
group_stroke_width: float | None = None,
group_text_anchor: TextAnchor | None = None,
group_transform: NoneValueType
| tuple[Transformation]
| None = None,
end_shorten: float = 0.0,
fill: NoneValueType | Color | None = None,
filter: NoneValueType | Filter | None = None,
path_filter: NoneValueType | Filter | None = None,
path_stroke_dasharray: tuple[float, ...] | None = None,
path_stroke_dashoffset: float | None = None,
path_transform: NoneValueType
| tuple[Transformation]
| None = None,
stroke: NoneValueType | Color | None = None,
stroke_dasharray: NoneValueType
| tuple[float]
| None = None,
stroke_dashoffset: float | None = None,
stroke_width: float | None = None,
segments: tuple[
Segment | BezierCurve | EllipticalArc
] = tuple(),
source: LayoutElement | None = None,
start_shorten: float = 0.0,
target: LayoutElement | None = None,
transform: NoneValueType
| tuple[Transformation]
| None = None,
arrowhead_filter: NoneValueType | Filter | None = None,
arrowhead_stroke_dasharray: tuple[float, ...]
| None = None,
arrowhead_stroke_dashoffset: float | None = None,
arrowhead_transform: NoneValueType
| tuple[Transformation]
| None = None,
)
Bases: SBGNSingleHeadedArc
Class for equivalence arc layouts
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id_
|
str
|
The id of the map element. This id is purely for the user to keep track of the element, it does not need to be unique and is not part of the identity of the element, i.e., it is not considered when testing for equality between two map elements or when hashing the map element |
'f8069272-ba27-430b-80de-f148b16f3247'
|
layout_elements
|
tuple[LayoutElement]
|
The sub-layout elements of the group layout. These are part of the children of the group layout |
<dynamic>
|
group_fill
|
NoneValueType | Color | None
|
The fill color of the group layout |
None
|
group_fill_rule
|
FillRule | None
|
The fill rule of the group layout |
None
|
group_filter
|
NoneValueType | Filter | None
|
The filter of the group layout |
None
|
group_font_family
|
str | None
|
The font family of the group layout |
None
|
group_font_size
|
float | None
|
The font size of the group layout |
None
|
group_font_style
|
FontStyle | None
|
The font style of the group layout |
None
|
group_font_weight
|
FontWeight | float | None
|
The font weight of the group layout |
None
|
group_stroke
|
NoneValueType | Color | None
|
The stroke color of the group layout |
None
|
group_stroke_dasharray
|
tuple[float, ...] | None
|
The stroke dasharray of the group layout |
None
|
group_stroke_dashoffset
|
float | None
|
The stroke dashoffset of the group layout |
None
|
group_stroke_width
|
float | None
|
The stroke width of the group layout |
None
|
group_text_anchor
|
TextAnchor | None
|
The text anchor of the group layout |
None
|
group_transform
|
NoneValueType | tuple[Transformation] | None
|
The transform of the group layout |
None
|
end_shorten
|
float
|
The length the end of the arc will be shorten by |
0.0
|
fill
|
NoneValueType | Color | None
|
The fill color of the arc |
None
|
filter
|
NoneValueType | Filter | None
|
The fill filter of the arc |
None
|
path_fill
|
NoneValueType | Color | None
|
|
<momapy.drawing.NoneValueType object at 0x7fb32ae9f1d0>
|
path_filter
|
NoneValueType | Filter | None
|
The path filter of the arc |
None
|
path_stroke
|
NoneValueType | Color | None
|
|
Color(red=0, green=0, blue=0, alpha=1.0)
|
path_stroke_dasharray
|
tuple[float, ...] | None
|
The path stroke dasharray of the arc |
None
|
path_stroke_dashoffset
|
float | None
|
The path stroke dashoffset of the arc |
None
|
path_stroke_width
|
float | None
|
|
1.25
|
path_transform
|
NoneValueType | tuple[Transformation] | None
|
The path transform of the arc |
None
|
stroke
|
NoneValueType | Color | None
|
The stroke color of the arc |
None
|
stroke_dasharray
|
NoneValueType | tuple[float] | None
|
The stroke dasharray of the arc |
None
|
stroke_dashoffset
|
float | None
|
The stroke dashoffset of the arc |
None
|
stroke_width
|
float | None
|
The stroke width of the arc |
None
|
segments
|
tuple[Union[Segment, BezierCurve, EllipticalArc]]
|
The path segments of the arc |
<dynamic>
|
source
|
LayoutElement | None
|
The source of the arc |
None
|
start_shorten
|
float
|
The length the start of the arc will be shorten by |
0.0
|
target
|
LayoutElement | None
|
The target of the arc |
None
|
transform
|
NoneValueType | tuple[Transformation] | None
|
The transform of the arc |
None
|
arrowhead_fill
|
NoneValueType | Color | None
|
|
Color(red=255, green=255, blue=255, alpha=1.0)
|
arrowhead_filter
|
NoneValueType | Filter | None
|
The arrowhead filter of the arc |
None
|
arrowhead_stroke
|
NoneValueType | Color | None
|
|
Color(red=0, green=0, blue=0, alpha=1.0)
|
arrowhead_stroke_dasharray
|
tuple[float, ...] | None
|
The arrowhead stroke dasharray of the arc |
None
|
arrowhead_stroke_dashoffset
|
float | None
|
The arrowhead stroke dashoffset of the arc |
None
|
arrowhead_stroke_width
|
float | None
|
|
1.25
|
arrowhead_transform
|
NoneValueType | tuple[Transformation] | None
|
The arrowhead transform of the arc |
None
|
Methods:
| Name | Description |
|---|---|
anchor_point |
Return an anchor point of the layout element |
arrowhead_base |
Return the arrowhead base anchor point of the single-headed arc |
arrowhead_bbox |
Return the bounding box of the single-headed arc arrowhead |
arrowhead_border |
Return the point at the intersection of the drawing elements of the single-headed arc arrowhead and the line going through the center of these drawing elements and the given point. |
arrowhead_drawing_elements |
Return the drawing elements of the single-headed arc arrowhead |
arrowhead_length |
Return the length of the single-headed arc arrowhead |
arrowhead_tip |
Return the arrowhead tip anchor point of the single-headed arc |
bbox |
Compute and return the bounding box of the group layout element |
childless |
Return a copy of the arc with no children |
children |
Return the children of the group layout. |
contains |
Return |
descendants |
Return the descendants of the layout element |
drawing_elements |
Return the drawing elements of the group layout. |
end_point |
Return the ending point of the arc |
equals |
Return |
flattened |
Return a list containing copy of the layout element with no children and all its descendants with no children |
fraction |
Return the position and angle on the arc at a given fraction (of the total arc length) |
length |
Return the total length of the arc path |
path_drawing_elements |
Return the drawing elements of the single-headed arc path |
points |
Return the points of the arc path |
self_bbox |
Compute and return the bounding box of the self drawing element of the group layout |
self_children |
Return the self children of the arc |
self_drawing_elements |
Return the self drawing elements of the single-headed arc |
self_to_shapely |
Compute and return a shapely collection of geometries reproducing the self drawing elements of the group layout |
start_point |
Return the starting point of the arc |
to_shapely |
Return a shapely collection of geometries reproducing the drawing elements of the layout element |
anchor_point
anchor_point(anchor_name: str) -> Point
arrowhead_base
arrowhead_base() -> Point
Return the arrowhead base anchor point of the single-headed arc
Source code in src/momapy/core.py
arrowhead_border
arrowhead_border(point) -> Point
Return the point at the intersection of the drawing elements of the single-headed arc arrowhead and the line going through the center of these drawing elements and the given point. When there are multiple intersection points, the one closest to the given point is returned
Source code in src/momapy/core.py
arrowhead_drawing_elements
arrowhead_drawing_elements() -> list[DrawingElement]
Return the drawing elements of the single-headed arc arrowhead
Source code in src/momapy/core.py
arrowhead_length
Return the length of the single-headed arc arrowhead
Source code in src/momapy/core.py
arrowhead_tip
arrowhead_tip() -> Point
Return the arrowhead tip anchor point of the single-headed arc
Source code in src/momapy/core.py
bbox
bbox() -> Bbox
Compute and return the bounding box of the group layout element
Source code in src/momapy/core.py
childless
children
children() -> list[LayoutElement]
Return the children of the group layout.
These are the self children of the group layout (returned by the self_children method) and the other children of the group layout (given by the layout_elements attribute)
Source code in src/momapy/core.py
contains
contains(other: LayoutElement) -> bool
Return true if another layout element is a descendant of the layout element, false otherwise
drawing_elements
drawing_elements() -> list[DrawingElement]
Return the drawing elements of the group layout. The returned drawing elements are a group drawing element formed of the self drawing elements of the group layout and the drawing elements of its children
Source code in src/momapy/core.py
end_point
end_point() -> Point
equals
equals(
other: LayoutElement,
flattened: bool = False,
unordered: bool = False,
) -> bool
Return true if the layout element is equal to another layout element, false otherwise
Source code in src/momapy/core.py
flattened
flattened() -> list[LayoutElement]
Return a list containing copy of the layout element with no children and all its descendants with no children
Source code in src/momapy/core.py
fraction
fraction(fraction: float) -> tuple[Point, float]
Return the position and angle on the arc at a given fraction (of the total arc length)
Source code in src/momapy/core.py
length
path_drawing_elements
path_drawing_elements() -> list[Path]
Return the drawing elements of the single-headed arc path
Source code in src/momapy/core.py
points
points() -> list[Point]
self_bbox
self_bbox() -> Bbox
Compute and return the bounding box of the self drawing element of the group layout
self_children
self_children() -> list[LayoutElement]
self_drawing_elements
self_drawing_elements() -> list[DrawingElement]
Return the self drawing elements of the single-headed arc
Source code in src/momapy/core.py
self_to_shapely
Compute and return a shapely collection of geometries reproducing the self drawing elements of the group layout
start_point
start_point() -> Point
to_shapely
Return a shapely collection of geometries reproducing the drawing elements of the layout element
Source code in src/momapy/core.py
Influence
dataclass
Influence(
*,
id_: str = make_uuid4_as_str(),
source: BiologicalActivity | LogicalOperator,
target: Activity,
)
Bases: SBGNModelElement
Class for influences
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id_
|
str
|
The id of the map element. This id is purely for the user to keep track of the element, it does not need to be unique and is not part of the identity of the element, i.e., it is not considered when testing for equality between two map elements or when hashing the map element |
'104c69bb-158f-44a4-8d43-3d9f6dafbf09'
|
source
|
BiologicalActivity | LogicalOperator
|
|
required |
target
|
Activity
|
|
required |
LogicArcLayout
dataclass
LogicArcLayout(
path_fill: NoneValueType | Color | None = NoneValue,
path_stroke: NoneValueType | Color | None = black,
path_stroke_width: float | None = 1.25,
arrowhead_fill: NoneValueType | Color | None = white,
arrowhead_stroke: NoneValueType | Color | None = black,
arrowhead_stroke_width: float | None = 1.25,
*,
id_: str = make_uuid4_as_str(),
layout_elements: tuple[LayoutElement] = tuple(),
group_fill: NoneValueType | Color | None = None,
group_fill_rule: FillRule | None = None,
group_filter: NoneValueType | Filter | None = None,
group_font_family: str | None = None,
group_font_size: float | None = None,
group_font_style: FontStyle | None = None,
group_font_weight: FontWeight | float | None = None,
group_stroke: NoneValueType | Color | None = None,
group_stroke_dasharray: tuple[float, ...] | None = None,
group_stroke_dashoffset: float | None = None,
group_stroke_width: float | None = None,
group_text_anchor: TextAnchor | None = None,
group_transform: NoneValueType
| tuple[Transformation]
| None = None,
end_shorten: float = 0.0,
fill: NoneValueType | Color | None = None,
filter: NoneValueType | Filter | None = None,
path_filter: NoneValueType | Filter | None = None,
path_stroke_dasharray: tuple[float, ...] | None = None,
path_stroke_dashoffset: float | None = None,
path_transform: NoneValueType
| tuple[Transformation]
| None = None,
stroke: NoneValueType | Color | None = None,
stroke_dasharray: NoneValueType
| tuple[float]
| None = None,
stroke_dashoffset: float | None = None,
stroke_width: float | None = None,
segments: tuple[
Segment | BezierCurve | EllipticalArc
] = tuple(),
source: LayoutElement | None = None,
start_shorten: float = 0.0,
target: LayoutElement | None = None,
transform: NoneValueType
| tuple[Transformation]
| None = None,
arrowhead_filter: NoneValueType | Filter | None = None,
arrowhead_stroke_dasharray: tuple[float, ...]
| None = None,
arrowhead_stroke_dashoffset: float | None = None,
arrowhead_transform: NoneValueType
| tuple[Transformation]
| None = None,
)
Bases: SBGNSingleHeadedArc
Class for logic arc layouts
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id_
|
str
|
The id of the map element. This id is purely for the user to keep track of the element, it does not need to be unique and is not part of the identity of the element, i.e., it is not considered when testing for equality between two map elements or when hashing the map element |
'6436e000-fcca-416d-94b6-7d3a9e0764de'
|
layout_elements
|
tuple[LayoutElement]
|
The sub-layout elements of the group layout. These are part of the children of the group layout |
<dynamic>
|
group_fill
|
NoneValueType | Color | None
|
The fill color of the group layout |
None
|
group_fill_rule
|
FillRule | None
|
The fill rule of the group layout |
None
|
group_filter
|
NoneValueType | Filter | None
|
The filter of the group layout |
None
|
group_font_family
|
str | None
|
The font family of the group layout |
None
|
group_font_size
|
float | None
|
The font size of the group layout |
None
|
group_font_style
|
FontStyle | None
|
The font style of the group layout |
None
|
group_font_weight
|
FontWeight | float | None
|
The font weight of the group layout |
None
|
group_stroke
|
NoneValueType | Color | None
|
The stroke color of the group layout |
None
|
group_stroke_dasharray
|
tuple[float, ...] | None
|
The stroke dasharray of the group layout |
None
|
group_stroke_dashoffset
|
float | None
|
The stroke dashoffset of the group layout |
None
|
group_stroke_width
|
float | None
|
The stroke width of the group layout |
None
|
group_text_anchor
|
TextAnchor | None
|
The text anchor of the group layout |
None
|
group_transform
|
NoneValueType | tuple[Transformation] | None
|
The transform of the group layout |
None
|
end_shorten
|
float
|
The length the end of the arc will be shorten by |
0.0
|
fill
|
NoneValueType | Color | None
|
The fill color of the arc |
None
|
filter
|
NoneValueType | Filter | None
|
The fill filter of the arc |
None
|
path_fill
|
NoneValueType | Color | None
|
|
<momapy.drawing.NoneValueType object at 0x7fb32ae9f1d0>
|
path_filter
|
NoneValueType | Filter | None
|
The path filter of the arc |
None
|
path_stroke
|
NoneValueType | Color | None
|
|
Color(red=0, green=0, blue=0, alpha=1.0)
|
path_stroke_dasharray
|
tuple[float, ...] | None
|
The path stroke dasharray of the arc |
None
|
path_stroke_dashoffset
|
float | None
|
The path stroke dashoffset of the arc |
None
|
path_stroke_width
|
float | None
|
|
1.25
|
path_transform
|
NoneValueType | tuple[Transformation] | None
|
The path transform of the arc |
None
|
stroke
|
NoneValueType | Color | None
|
The stroke color of the arc |
None
|
stroke_dasharray
|
NoneValueType | tuple[float] | None
|
The stroke dasharray of the arc |
None
|
stroke_dashoffset
|
float | None
|
The stroke dashoffset of the arc |
None
|
stroke_width
|
float | None
|
The stroke width of the arc |
None
|
segments
|
tuple[Union[Segment, BezierCurve, EllipticalArc]]
|
The path segments of the arc |
<dynamic>
|
source
|
LayoutElement | None
|
The source of the arc |
None
|
start_shorten
|
float
|
The length the start of the arc will be shorten by |
0.0
|
target
|
LayoutElement | None
|
The target of the arc |
None
|
transform
|
NoneValueType | tuple[Transformation] | None
|
The transform of the arc |
None
|
arrowhead_fill
|
NoneValueType | Color | None
|
|
Color(red=255, green=255, blue=255, alpha=1.0)
|
arrowhead_filter
|
NoneValueType | Filter | None
|
The arrowhead filter of the arc |
None
|
arrowhead_stroke
|
NoneValueType | Color | None
|
|
Color(red=0, green=0, blue=0, alpha=1.0)
|
arrowhead_stroke_dasharray
|
tuple[float, ...] | None
|
The arrowhead stroke dasharray of the arc |
None
|
arrowhead_stroke_dashoffset
|
float | None
|
The arrowhead stroke dashoffset of the arc |
None
|
arrowhead_stroke_width
|
float | None
|
|
1.25
|
arrowhead_transform
|
NoneValueType | tuple[Transformation] | None
|
The arrowhead transform of the arc |
None
|
Methods:
| Name | Description |
|---|---|
anchor_point |
Return an anchor point of the layout element |
arrowhead_base |
Return the arrowhead base anchor point of the single-headed arc |
arrowhead_bbox |
Return the bounding box of the single-headed arc arrowhead |
arrowhead_border |
Return the point at the intersection of the drawing elements of the single-headed arc arrowhead and the line going through the center of these drawing elements and the given point. |
arrowhead_drawing_elements |
Return the drawing elements of the single-headed arc arrowhead |
arrowhead_length |
Return the length of the single-headed arc arrowhead |
arrowhead_tip |
Return the arrowhead tip anchor point of the single-headed arc |
bbox |
Compute and return the bounding box of the group layout element |
childless |
Return a copy of the arc with no children |
children |
Return the children of the group layout. |
contains |
Return |
descendants |
Return the descendants of the layout element |
drawing_elements |
Return the drawing elements of the group layout. |
end_point |
Return the ending point of the arc |
equals |
Return |
flattened |
Return a list containing copy of the layout element with no children and all its descendants with no children |
fraction |
Return the position and angle on the arc at a given fraction (of the total arc length) |
length |
Return the total length of the arc path |
path_drawing_elements |
Return the drawing elements of the single-headed arc path |
points |
Return the points of the arc path |
self_bbox |
Compute and return the bounding box of the self drawing element of the group layout |
self_children |
Return the self children of the arc |
self_drawing_elements |
Return the self drawing elements of the single-headed arc |
self_to_shapely |
Compute and return a shapely collection of geometries reproducing the self drawing elements of the group layout |
start_point |
Return the starting point of the arc |
to_shapely |
Return a shapely collection of geometries reproducing the drawing elements of the layout element |
anchor_point
anchor_point(anchor_name: str) -> Point
arrowhead_base
arrowhead_base() -> Point
Return the arrowhead base anchor point of the single-headed arc
Source code in src/momapy/core.py
arrowhead_border
arrowhead_border(point) -> Point
Return the point at the intersection of the drawing elements of the single-headed arc arrowhead and the line going through the center of these drawing elements and the given point. When there are multiple intersection points, the one closest to the given point is returned
Source code in src/momapy/core.py
arrowhead_drawing_elements
arrowhead_drawing_elements() -> list[DrawingElement]
Return the drawing elements of the single-headed arc arrowhead
Source code in src/momapy/core.py
arrowhead_length
Return the length of the single-headed arc arrowhead
Source code in src/momapy/core.py
arrowhead_tip
arrowhead_tip() -> Point
Return the arrowhead tip anchor point of the single-headed arc
Source code in src/momapy/core.py
bbox
bbox() -> Bbox
Compute and return the bounding box of the group layout element
Source code in src/momapy/core.py
childless
children
children() -> list[LayoutElement]
Return the children of the group layout.
These are the self children of the group layout (returned by the self_children method) and the other children of the group layout (given by the layout_elements attribute)
Source code in src/momapy/core.py
contains
contains(other: LayoutElement) -> bool
Return true if another layout element is a descendant of the layout element, false otherwise
drawing_elements
drawing_elements() -> list[DrawingElement]
Return the drawing elements of the group layout. The returned drawing elements are a group drawing element formed of the self drawing elements of the group layout and the drawing elements of its children
Source code in src/momapy/core.py
end_point
end_point() -> Point
equals
equals(
other: LayoutElement,
flattened: bool = False,
unordered: bool = False,
) -> bool
Return true if the layout element is equal to another layout element, false otherwise
Source code in src/momapy/core.py
flattened
flattened() -> list[LayoutElement]
Return a list containing copy of the layout element with no children and all its descendants with no children
Source code in src/momapy/core.py
fraction
fraction(fraction: float) -> tuple[Point, float]
Return the position and angle on the arc at a given fraction (of the total arc length)
Source code in src/momapy/core.py
length
path_drawing_elements
path_drawing_elements() -> list[Path]
Return the drawing elements of the single-headed arc path
Source code in src/momapy/core.py
points
points() -> list[Point]
self_bbox
self_bbox() -> Bbox
Compute and return the bounding box of the self drawing element of the group layout
self_children
self_children() -> list[LayoutElement]
self_drawing_elements
self_drawing_elements() -> list[DrawingElement]
Return the self drawing elements of the single-headed arc
Source code in src/momapy/core.py
self_to_shapely
Compute and return a shapely collection of geometries reproducing the self drawing elements of the group layout
start_point
start_point() -> Point
to_shapely
Return a shapely collection of geometries reproducing the drawing elements of the layout element
Source code in src/momapy/core.py
LogicalOperator
dataclass
LogicalOperator(
*,
id_: str = make_uuid4_as_str(),
inputs: frozenset[LogicalOperatorInput] = frozenset(),
)
Bases: SBGNModelElement
Class for logical operators
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id_
|
str
|
The id of the map element. This id is purely for the user to keep track of the element, it does not need to be unique and is not part of the identity of the element, i.e., it is not considered when testing for equality between two map elements or when hashing the map element |
'c42e3eb0-b053-4e5a-99c3-8974da6cd13b'
|
inputs
|
frozenset[LogicalOperatorInput]
|
frozenset() -> empty frozenset object frozenset(iterable) -> frozenset object Build an immutable unordered collection of unique elements. |
<class 'frozenset'>
|
LogicalOperatorInput
dataclass
LogicalOperatorInput(
*,
id_: str = make_uuid4_as_str(),
element: Union[BiologicalActivity, LogicalOperator],
)
Bases: SBGNRole
Class for inputs of logical operators
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id_
|
str
|
The id of the map element. This id is purely for the user to keep track of the element, it does not need to be unique and is not part of the identity of the element, i.e., it is not considered when testing for equality between two map elements or when hashing the map element |
'b72a3a71-73fe-4b16-a3d2-c49997564117'
|
element
|
BiologicalActivity | ForwardRef(LogicalOperator)
|
|
required |
MacromoleculeUnitOfInformation
dataclass
Bases: UnitOfInformation
Class for marcomolecule units of information
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id_
|
str
|
The id of the map element. This id is purely for the user to keep track of the element, it does not need to be unique and is not part of the identity of the element, i.e., it is not considered when testing for equality between two map elements or when hashing the map element |
'fad8f78f-d834-47c9-af1d-25b75c2502b0'
|
label
|
str | None
|
|
None
|
MacromoleculeUnitOfInformationLayout
dataclass
MacromoleculeUnitOfInformationLayout(
fill: NoneValueType | Color | None = white,
stroke: NoneValueType | Color | None = black,
stroke_width: float | None = 1.25,
*,
id_: str = make_uuid4_as_str(),
layout_elements: tuple[LayoutElement] = tuple(),
group_fill: NoneValueType | Color | None = None,
group_fill_rule: FillRule | None = None,
group_filter: NoneValueType | Filter | None = None,
group_font_family: str | None = None,
group_font_size: float | None = None,
group_font_style: FontStyle | None = None,
group_font_weight: FontWeight | float | None = None,
group_stroke: NoneValueType | Color | None = None,
group_stroke_dasharray: tuple[float, ...] | None = None,
group_stroke_dashoffset: float | None = None,
group_stroke_width: float | None = None,
group_text_anchor: TextAnchor | None = None,
group_transform: NoneValueType
| tuple[Transformation]
| None = None,
filter: NoneValueType | Filter | None = None,
height: float = 12.0,
label: TextLayout | None = None,
position: Point,
stroke_dasharray: tuple[float, ...] | None = None,
stroke_dashoffset: float | None = None,
transform: NoneValueType
| tuple[Transformation]
| None = None,
width: float = 12.0,
rounded_corners: float = 5.0,
)
Bases: _SimpleMixin, SBGNNode
Class for macromolecule unit of information layouts
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id_
|
str
|
The id of the map element. This id is purely for the user to keep track of the element, it does not need to be unique and is not part of the identity of the element, i.e., it is not considered when testing for equality between two map elements or when hashing the map element |
'900a80a3-0dd4-46ff-9303-a98d991d9722'
|
layout_elements
|
tuple[LayoutElement]
|
The sub-layout elements of the group layout. These are part of the children of the group layout |
<dynamic>
|
group_fill
|
NoneValueType | Color | None
|
The fill color of the group layout |
None
|
group_fill_rule
|
FillRule | None
|
The fill rule of the group layout |
None
|
group_filter
|
NoneValueType | Filter | None
|
The filter of the group layout |
None
|
group_font_family
|
str | None
|
The font family of the group layout |
None
|
group_font_size
|
float | None
|
The font size of the group layout |
None
|
group_font_style
|
FontStyle | None
|
The font style of the group layout |
None
|
group_font_weight
|
FontWeight | float | None
|
The font weight of the group layout |
None
|
group_stroke
|
NoneValueType | Color | None
|
The stroke color of the group layout |
None
|
group_stroke_dasharray
|
tuple[float, ...] | None
|
The stroke dasharray of the group layout |
None
|
group_stroke_dashoffset
|
float | None
|
The stroke dashoffset of the group layout |
None
|
group_stroke_width
|
float | None
|
The stroke width of the group layout |
None
|
group_text_anchor
|
TextAnchor | None
|
The text anchor of the group layout |
None
|
group_transform
|
NoneValueType | tuple[Transformation] | None
|
The transform of the group layout |
None
|
fill
|
NoneValueType | Color | None
|
|
Color(red=255, green=255, blue=255, alpha=1.0)
|
filter
|
NoneValueType | Filter | None
|
The filter of the node |
None
|
height
|
float
|
|
12.0
|
label
|
TextLayout | None
|
The label of the node |
None
|
position
|
Point
|
The position of the node |
required |
stroke
|
NoneValueType | Color | None
|
|
Color(red=0, green=0, blue=0, alpha=1.0)
|
stroke_dasharray
|
tuple[float, ...] | None
|
The stroke dasharray of the node |
None
|
stroke_dashoffset
|
float | None
|
The stroke dashoffset of the node |
None
|
stroke_width
|
float | None
|
|
1.25
|
transform
|
NoneValueType | tuple[Transformation] | None
|
The transform of the node |
None
|
width
|
float
|
|
12.0
|
rounded_corners
|
float
|
|
5.0
|
Methods:
| Name | Description |
|---|---|
anchor_point |
Return an anchor point of the layout element |
angle |
Return the point on the border of the node that intersects the drawing elements of the node with the line passing through the center anchor point of the node and at a given angle from the horizontal. |
bbox |
Compute and return the bounding box of the group layout element |
border |
Return the point on the border of the node that intersects the drawing elements of the node with the line formed of the center anchor point of the node and the given point. |
center |
Return the center anchor of the node |
childless |
Return a copy of the node with no children |
children |
Return the children of the group layout. |
contains |
Return |
descendants |
Return the descendants of the layout element |
drawing_elements |
Return the drawing elements of the group layout. |
east |
Return the east anchor of the node |
east_north_east |
Return the east north east anchor of the node |
east_south_east |
Return the east south east west anchor of the node |
equals |
Return |
flattened |
Return a list containing copy of the layout element with no children and all its descendants with no children |
label_center |
Return the label center anchor of the node |
north |
Return the north anchor of the node |
north_east |
Return the north east anchor of the node |
north_north_east |
Return the north north east anchor of the node |
north_north_west |
Return the north north west anchor of the node |
north_west |
Return the north west anchor of the node |
self_angle |
Return the point on the border of the node that intersects the self drawing elements of the node with the line passing through the center anchor point of the node and at a given angle from the horizontal. |
self_bbox |
Compute and return the bounding box of the self drawing element of the group layout |
self_border |
Return the point on the border of the node that intersects the self drawing elements of the node with the line formed of the center anchor point of the node and the given point. |
self_children |
Return the self children of the node. A node has unique child that is its label |
self_drawing_elements |
Return the node's own drawing elements |
self_to_shapely |
Compute and return a shapely collection of geometries reproducing the self drawing elements of the group layout |
size |
Return the size of the node |
south |
Return the south anchor of the node |
south_east |
Return the south east anchor of the node |
south_south_east |
Return the south south east anchor of the node |
south_south_west |
Return the south south west anchor of the node |
south_west |
Return the south west anchor of the node |
to_shapely |
Return a shapely collection of geometries reproducing the drawing elements of the layout element |
west |
Return the west anchor of the node |
west_north_west |
Return the west north west anchor of the node |
west_south_west |
Return the west south west anchor of the node |
Attributes:
| Name | Type | Description |
|---|---|---|
x |
float
|
Return the x coordinate of the node |
y |
float
|
Return the y coordinate of the node |
anchor_point
anchor_point(anchor_name: str) -> Point
angle
angle(
angle: float,
unit: Literal["degrees", "radians"] = "degrees",
) -> Point
Return the point on the border of the node that intersects the drawing elements of the node with the line passing through the center anchor point of the node and at a given angle from the horizontal.
Source code in src/momapy/core.py
bbox
bbox() -> Bbox
Compute and return the bounding box of the group layout element
Source code in src/momapy/core.py
border
Return the point on the border of the node that intersects the drawing elements of the node with the line formed of the center anchor point of the node and the given point. When there are multiple intersection points, the one closest to the given point is returned
Source code in src/momapy/core.py
center
center() -> Point
childless
children
children() -> list[LayoutElement]
Return the children of the group layout.
These are the self children of the group layout (returned by the self_children method) and the other children of the group layout (given by the layout_elements attribute)
Source code in src/momapy/core.py
contains
contains(other: LayoutElement) -> bool
Return true if another layout element is a descendant of the layout element, false otherwise
drawing_elements
drawing_elements() -> list[DrawingElement]
Return the drawing elements of the group layout. The returned drawing elements are a group drawing element formed of the self drawing elements of the group layout and the drawing elements of its children
Source code in src/momapy/core.py
east
east() -> Point
east_north_east
east_north_east() -> Point
Return the east north east anchor of the node
Source code in src/momapy/core.py
east_south_east
east_south_east() -> Point
Return the east south east west anchor of the node
Source code in src/momapy/core.py
equals
equals(
other: LayoutElement,
flattened: bool = False,
unordered: bool = False,
) -> bool
Return true if the layout element is equal to another layout element, false otherwise
Source code in src/momapy/core.py
flattened
flattened() -> list[LayoutElement]
Return a list containing copy of the layout element with no children and all its descendants with no children
Source code in src/momapy/core.py
label_center
label_center() -> Point
north
north() -> Point
north_east
north_east() -> Point
Return the north east anchor of the node
Source code in src/momapy/core.py
north_north_east
north_north_east() -> Point
Return the north north east anchor of the node
Source code in src/momapy/core.py
north_north_west
north_north_west() -> Point
Return the north north west anchor of the node
Source code in src/momapy/core.py
north_west
north_west() -> Point
Return the north west anchor of the node
Source code in src/momapy/core.py
self_angle
self_angle(
angle: float,
unit: Literal["degrees", "radians"] = "degrees",
) -> Point
Return the point on the border of the node that intersects the self drawing elements of the node with the line passing through the center anchor point of the node and at a given angle from the horizontal.
Source code in src/momapy/core.py
self_bbox
self_bbox() -> Bbox
Compute and return the bounding box of the self drawing element of the group layout
self_border
Return the point on the border of the node that intersects the self drawing elements of the node with the line formed of the center anchor point of the node and the given point. When there are multiple intersection points, the one closest to the given point is returned
Source code in src/momapy/core.py
self_children
self_children() -> list[LayoutElement]
Return the self children of the node. A node has unique child that is its label
self_drawing_elements
self_drawing_elements() -> list[DrawingElement]
Return the node's own drawing elements
Source code in src/momapy/core.py
self_to_shapely
Compute and return a shapely collection of geometries reproducing the self drawing elements of the group layout
size
south
south() -> Point
south_east
south_east() -> Point
Return the south east anchor of the node
Source code in src/momapy/core.py
south_south_east
south_south_east() -> Point
Return the south south east anchor of the node
Source code in src/momapy/core.py
south_south_west
south_south_west() -> Point
Return the south south west anchor of the node
Source code in src/momapy/core.py
south_west
south_west() -> Point
Return the south west anchor of the node
Source code in src/momapy/core.py
to_shapely
Return a shapely collection of geometries reproducing the drawing elements of the layout element
Source code in src/momapy/core.py
west
west() -> Point
west_north_west
west_north_west() -> Point
Return the west north west anchor of the node
Source code in src/momapy/core.py
west_south_west
west_south_west() -> Point
Return the west south west anchor of the node
Source code in src/momapy/core.py
NecessaryStimulation
dataclass
NecessaryStimulation(
*,
id_: str = make_uuid4_as_str(),
source: BiologicalActivity | LogicalOperator,
target: Activity,
)
Bases: Influence
Class for necessary stimulations
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id_
|
str
|
The id of the map element. This id is purely for the user to keep track of the element, it does not need to be unique and is not part of the identity of the element, i.e., it is not considered when testing for equality between two map elements or when hashing the map element |
'9b288ea6-bead-4382-8c32-53d5e13906a0'
|
source
|
BiologicalActivity | LogicalOperator
|
|
required |
target
|
Activity
|
|
required |
NecessaryStimulationLayout
dataclass
NecessaryStimulationLayout(
path_fill: NoneValueType | Color | None = NoneValue,
path_stroke: NoneValueType | Color | None = black,
path_stroke_width: float | None = 1.25,
arrowhead_fill: NoneValueType | Color | None = white,
arrowhead_stroke: NoneValueType | Color | None = black,
arrowhead_stroke_width: float | None = 1.25,
*,
id_: str = make_uuid4_as_str(),
layout_elements: tuple[LayoutElement] = tuple(),
group_fill: NoneValueType | Color | None = None,
group_fill_rule: FillRule | None = None,
group_filter: NoneValueType | Filter | None = None,
group_font_family: str | None = None,
group_font_size: float | None = None,
group_font_style: FontStyle | None = None,
group_font_weight: FontWeight | float | None = None,
group_stroke: NoneValueType | Color | None = None,
group_stroke_dasharray: tuple[float, ...] | None = None,
group_stroke_dashoffset: float | None = None,
group_stroke_width: float | None = None,
group_text_anchor: TextAnchor | None = None,
group_transform: NoneValueType
| tuple[Transformation]
| None = None,
end_shorten: float = 0.0,
fill: NoneValueType | Color | None = None,
filter: NoneValueType | Filter | None = None,
path_filter: NoneValueType | Filter | None = None,
path_stroke_dasharray: tuple[float, ...] | None = None,
path_stroke_dashoffset: float | None = None,
path_transform: NoneValueType
| tuple[Transformation]
| None = None,
stroke: NoneValueType | Color | None = None,
stroke_dasharray: NoneValueType
| tuple[float]
| None = None,
stroke_dashoffset: float | None = None,
stroke_width: float | None = None,
segments: tuple[
Segment | BezierCurve | EllipticalArc
] = tuple(),
source: LayoutElement | None = None,
start_shorten: float = 0.0,
target: LayoutElement | None = None,
transform: NoneValueType
| tuple[Transformation]
| None = None,
arrowhead_filter: NoneValueType | Filter | None = None,
arrowhead_stroke_dasharray: tuple[float, ...]
| None = None,
arrowhead_stroke_dashoffset: float | None = None,
arrowhead_transform: NoneValueType
| tuple[Transformation]
| None = None,
arrowhead_bar_height: float = 12.0,
arrowhead_sep: float = 3.0,
arrowhead_triangle_height: float = 10.0,
arrowhead_triangle_width: float = 10.0,
)
Bases: SBGNSingleHeadedArc
Class for necessary stimulation layouts
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id_
|
str
|
The id of the map element. This id is purely for the user to keep track of the element, it does not need to be unique and is not part of the identity of the element, i.e., it is not considered when testing for equality between two map elements or when hashing the map element |
'223f8295-40ba-4be0-b6a0-34081d544ac5'
|
layout_elements
|
tuple[LayoutElement]
|
The sub-layout elements of the group layout. These are part of the children of the group layout |
<dynamic>
|
group_fill
|
NoneValueType | Color | None
|
The fill color of the group layout |
None
|
group_fill_rule
|
FillRule | None
|
The fill rule of the group layout |
None
|
group_filter
|
NoneValueType | Filter | None
|
The filter of the group layout |
None
|
group_font_family
|
str | None
|
The font family of the group layout |
None
|
group_font_size
|
float | None
|
The font size of the group layout |
None
|
group_font_style
|
FontStyle | None
|
The font style of the group layout |
None
|
group_font_weight
|
FontWeight | float | None
|
The font weight of the group layout |
None
|
group_stroke
|
NoneValueType | Color | None
|
The stroke color of the group layout |
None
|
group_stroke_dasharray
|
tuple[float, ...] | None
|
The stroke dasharray of the group layout |
None
|
group_stroke_dashoffset
|
float | None
|
The stroke dashoffset of the group layout |
None
|
group_stroke_width
|
float | None
|
The stroke width of the group layout |
None
|
group_text_anchor
|
TextAnchor | None
|
The text anchor of the group layout |
None
|
group_transform
|
NoneValueType | tuple[Transformation] | None
|
The transform of the group layout |
None
|
end_shorten
|
float
|
The length the end of the arc will be shorten by |
0.0
|
fill
|
NoneValueType | Color | None
|
The fill color of the arc |
None
|
filter
|
NoneValueType | Filter | None
|
The fill filter of the arc |
None
|
path_fill
|
NoneValueType | Color | None
|
|
<momapy.drawing.NoneValueType object at 0x7fb32ae9f1d0>
|
path_filter
|
NoneValueType | Filter | None
|
The path filter of the arc |
None
|
path_stroke
|
NoneValueType | Color | None
|
|
Color(red=0, green=0, blue=0, alpha=1.0)
|
path_stroke_dasharray
|
tuple[float, ...] | None
|
The path stroke dasharray of the arc |
None
|
path_stroke_dashoffset
|
float | None
|
The path stroke dashoffset of the arc |
None
|
path_stroke_width
|
float | None
|
|
1.25
|
path_transform
|
NoneValueType | tuple[Transformation] | None
|
The path transform of the arc |
None
|
stroke
|
NoneValueType | Color | None
|
The stroke color of the arc |
None
|
stroke_dasharray
|
NoneValueType | tuple[float] | None
|
The stroke dasharray of the arc |
None
|
stroke_dashoffset
|
float | None
|
The stroke dashoffset of the arc |
None
|
stroke_width
|
float | None
|
The stroke width of the arc |
None
|
segments
|
tuple[Union[Segment, BezierCurve, EllipticalArc]]
|
The path segments of the arc |
<dynamic>
|
source
|
LayoutElement | None
|
The source of the arc |
None
|
start_shorten
|
float
|
The length the start of the arc will be shorten by |
0.0
|
target
|
LayoutElement | None
|
The target of the arc |
None
|
transform
|
NoneValueType | tuple[Transformation] | None
|
The transform of the arc |
None
|
arrowhead_fill
|
NoneValueType | Color | None
|
|
Color(red=255, green=255, blue=255, alpha=1.0)
|
arrowhead_filter
|
NoneValueType | Filter | None
|
The arrowhead filter of the arc |
None
|
arrowhead_stroke
|
NoneValueType | Color | None
|
|
Color(red=0, green=0, blue=0, alpha=1.0)
|
arrowhead_stroke_dasharray
|
tuple[float, ...] | None
|
The arrowhead stroke dasharray of the arc |
None
|
arrowhead_stroke_dashoffset
|
float | None
|
The arrowhead stroke dashoffset of the arc |
None
|
arrowhead_stroke_width
|
float | None
|
|
1.25
|
arrowhead_transform
|
NoneValueType | tuple[Transformation] | None
|
The arrowhead transform of the arc |
None
|
arrowhead_bar_height
|
float
|
|
12.0
|
arrowhead_sep
|
float
|
|
3.0
|
arrowhead_triangle_height
|
float
|
|
10.0
|
arrowhead_triangle_width
|
float
|
|
10.0
|
Methods:
| Name | Description |
|---|---|
anchor_point |
Return an anchor point of the layout element |
arrowhead_base |
Return the arrowhead base anchor point of the single-headed arc |
arrowhead_bbox |
Return the bounding box of the single-headed arc arrowhead |
arrowhead_border |
Return the point at the intersection of the drawing elements of the single-headed arc arrowhead and the line going through the center of these drawing elements and the given point. |
arrowhead_drawing_elements |
Return the drawing elements of the single-headed arc arrowhead |
arrowhead_length |
Return the length of the single-headed arc arrowhead |
arrowhead_tip |
Return the arrowhead tip anchor point of the single-headed arc |
bbox |
Compute and return the bounding box of the group layout element |
childless |
Return a copy of the arc with no children |
children |
Return the children of the group layout. |
contains |
Return |
descendants |
Return the descendants of the layout element |
drawing_elements |
Return the drawing elements of the group layout. |
end_point |
Return the ending point of the arc |
equals |
Return |
flattened |
Return a list containing copy of the layout element with no children and all its descendants with no children |
fraction |
Return the position and angle on the arc at a given fraction (of the total arc length) |
length |
Return the total length of the arc path |
path_drawing_elements |
Return the drawing elements of the single-headed arc path |
points |
Return the points of the arc path |
self_bbox |
Compute and return the bounding box of the self drawing element of the group layout |
self_children |
Return the self children of the arc |
self_drawing_elements |
Return the self drawing elements of the single-headed arc |
self_to_shapely |
Compute and return a shapely collection of geometries reproducing the self drawing elements of the group layout |
start_point |
Return the starting point of the arc |
to_shapely |
Return a shapely collection of geometries reproducing the drawing elements of the layout element |
anchor_point
anchor_point(anchor_name: str) -> Point
arrowhead_base
arrowhead_base() -> Point
Return the arrowhead base anchor point of the single-headed arc
Source code in src/momapy/core.py
arrowhead_border
arrowhead_border(point) -> Point
Return the point at the intersection of the drawing elements of the single-headed arc arrowhead and the line going through the center of these drawing elements and the given point. When there are multiple intersection points, the one closest to the given point is returned
Source code in src/momapy/core.py
arrowhead_drawing_elements
arrowhead_drawing_elements() -> list[DrawingElement]
Return the drawing elements of the single-headed arc arrowhead
Source code in src/momapy/core.py
arrowhead_length
Return the length of the single-headed arc arrowhead
Source code in src/momapy/core.py
arrowhead_tip
arrowhead_tip() -> Point
Return the arrowhead tip anchor point of the single-headed arc
Source code in src/momapy/core.py
bbox
bbox() -> Bbox
Compute and return the bounding box of the group layout element
Source code in src/momapy/core.py
childless
children
children() -> list[LayoutElement]
Return the children of the group layout.
These are the self children of the group layout (returned by the self_children method) and the other children of the group layout (given by the layout_elements attribute)
Source code in src/momapy/core.py
contains
contains(other: LayoutElement) -> bool
Return true if another layout element is a descendant of the layout element, false otherwise
drawing_elements
drawing_elements() -> list[DrawingElement]
Return the drawing elements of the group layout. The returned drawing elements are a group drawing element formed of the self drawing elements of the group layout and the drawing elements of its children
Source code in src/momapy/core.py
end_point
end_point() -> Point
equals
equals(
other: LayoutElement,
flattened: bool = False,
unordered: bool = False,
) -> bool
Return true if the layout element is equal to another layout element, false otherwise
Source code in src/momapy/core.py
flattened
flattened() -> list[LayoutElement]
Return a list containing copy of the layout element with no children and all its descendants with no children
Source code in src/momapy/core.py
fraction
fraction(fraction: float) -> tuple[Point, float]
Return the position and angle on the arc at a given fraction (of the total arc length)
Source code in src/momapy/core.py
length
path_drawing_elements
path_drawing_elements() -> list[Path]
Return the drawing elements of the single-headed arc path
Source code in src/momapy/core.py
points
points() -> list[Point]
self_bbox
self_bbox() -> Bbox
Compute and return the bounding box of the self drawing element of the group layout
self_children
self_children() -> list[LayoutElement]
self_drawing_elements
self_drawing_elements() -> list[DrawingElement]
Return the self drawing elements of the single-headed arc
Source code in src/momapy/core.py
self_to_shapely
Compute and return a shapely collection of geometries reproducing the self drawing elements of the group layout
start_point
start_point() -> Point
to_shapely
Return a shapely collection of geometries reproducing the drawing elements of the layout element
Source code in src/momapy/core.py
NegativeInfluence
dataclass
NegativeInfluence(
*,
id_: str = make_uuid4_as_str(),
source: BiologicalActivity | LogicalOperator,
target: Activity,
)
Bases: Influence
Class for negative influences
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id_
|
str
|
The id of the map element. This id is purely for the user to keep track of the element, it does not need to be unique and is not part of the identity of the element, i.e., it is not considered when testing for equality between two map elements or when hashing the map element |
'3b427d1b-de95-4794-8aa5-cf80939bea19'
|
source
|
BiologicalActivity | LogicalOperator
|
|
required |
target
|
Activity
|
|
required |
NegativeInfluenceLayout
dataclass
NegativeInfluenceLayout(
path_fill: NoneValueType | Color | None = NoneValue,
path_stroke: NoneValueType | Color | None = black,
path_stroke_width: float | None = 1.25,
arrowhead_fill: NoneValueType | Color | None = white,
arrowhead_stroke: NoneValueType | Color | None = black,
arrowhead_stroke_width: float | None = 1.25,
*,
id_: str = make_uuid4_as_str(),
layout_elements: tuple[LayoutElement] = tuple(),
group_fill: NoneValueType | Color | None = None,
group_fill_rule: FillRule | None = None,
group_filter: NoneValueType | Filter | None = None,
group_font_family: str | None = None,
group_font_size: float | None = None,
group_font_style: FontStyle | None = None,
group_font_weight: FontWeight | float | None = None,
group_stroke: NoneValueType | Color | None = None,
group_stroke_dasharray: tuple[float, ...] | None = None,
group_stroke_dashoffset: float | None = None,
group_stroke_width: float | None = None,
group_text_anchor: TextAnchor | None = None,
group_transform: NoneValueType
| tuple[Transformation]
| None = None,
end_shorten: float = 0.0,
fill: NoneValueType | Color | None = None,
filter: NoneValueType | Filter | None = None,
path_filter: NoneValueType | Filter | None = None,
path_stroke_dasharray: tuple[float, ...] | None = None,
path_stroke_dashoffset: float | None = None,
path_transform: NoneValueType
| tuple[Transformation]
| None = None,
stroke: NoneValueType | Color | None = None,
stroke_dasharray: NoneValueType
| tuple[float]
| None = None,
stroke_dashoffset: float | None = None,
stroke_width: float | None = None,
segments: tuple[
Segment | BezierCurve | EllipticalArc
] = tuple(),
source: LayoutElement | None = None,
start_shorten: float = 0.0,
target: LayoutElement | None = None,
transform: NoneValueType
| tuple[Transformation]
| None = None,
arrowhead_filter: NoneValueType | Filter | None = None,
arrowhead_stroke_dasharray: tuple[float, ...]
| None = None,
arrowhead_stroke_dashoffset: float | None = None,
arrowhead_transform: NoneValueType
| tuple[Transformation]
| None = None,
arrowhead_height: float = 10.0,
)
Bases: SBGNSingleHeadedArc
Class for negative influence layouts
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id_
|
str
|
The id of the map element. This id is purely for the user to keep track of the element, it does not need to be unique and is not part of the identity of the element, i.e., it is not considered when testing for equality between two map elements or when hashing the map element |
'1e235d1d-6802-4650-bf77-2b8a6cd5c043'
|
layout_elements
|
tuple[LayoutElement]
|
The sub-layout elements of the group layout. These are part of the children of the group layout |
<dynamic>
|
group_fill
|
NoneValueType | Color | None
|
The fill color of the group layout |
None
|
group_fill_rule
|
FillRule | None
|
The fill rule of the group layout |
None
|
group_filter
|
NoneValueType | Filter | None
|
The filter of the group layout |
None
|
group_font_family
|
str | None
|
The font family of the group layout |
None
|
group_font_size
|
float | None
|
The font size of the group layout |
None
|
group_font_style
|
FontStyle | None
|
The font style of the group layout |
None
|
group_font_weight
|
FontWeight | float | None
|
The font weight of the group layout |
None
|
group_stroke
|
NoneValueType | Color | None
|
The stroke color of the group layout |
None
|
group_stroke_dasharray
|
tuple[float, ...] | None
|
The stroke dasharray of the group layout |
None
|
group_stroke_dashoffset
|
float | None
|
The stroke dashoffset of the group layout |
None
|
group_stroke_width
|
float | None
|
The stroke width of the group layout |
None
|
group_text_anchor
|
TextAnchor | None
|
The text anchor of the group layout |
None
|
group_transform
|
NoneValueType | tuple[Transformation] | None
|
The transform of the group layout |
None
|
end_shorten
|
float
|
The length the end of the arc will be shorten by |
0.0
|
fill
|
NoneValueType | Color | None
|
The fill color of the arc |
None
|
filter
|
NoneValueType | Filter | None
|
The fill filter of the arc |
None
|
path_fill
|
NoneValueType | Color | None
|
|
<momapy.drawing.NoneValueType object at 0x7fb32ae9f1d0>
|
path_filter
|
NoneValueType | Filter | None
|
The path filter of the arc |
None
|
path_stroke
|
NoneValueType | Color | None
|
|
Color(red=0, green=0, blue=0, alpha=1.0)
|
path_stroke_dasharray
|
tuple[float, ...] | None
|
The path stroke dasharray of the arc |
None
|
path_stroke_dashoffset
|
float | None
|
The path stroke dashoffset of the arc |
None
|
path_stroke_width
|
float | None
|
|
1.25
|
path_transform
|
NoneValueType | tuple[Transformation] | None
|
The path transform of the arc |
None
|
stroke
|
NoneValueType | Color | None
|
The stroke color of the arc |
None
|
stroke_dasharray
|
NoneValueType | tuple[float] | None
|
The stroke dasharray of the arc |
None
|
stroke_dashoffset
|
float | None
|
The stroke dashoffset of the arc |
None
|
stroke_width
|
float | None
|
The stroke width of the arc |
None
|
segments
|
tuple[Union[Segment, BezierCurve, EllipticalArc]]
|
The path segments of the arc |
<dynamic>
|
source
|
LayoutElement | None
|
The source of the arc |
None
|
start_shorten
|
float
|
The length the start of the arc will be shorten by |
0.0
|
target
|
LayoutElement | None
|
The target of the arc |
None
|
transform
|
NoneValueType | tuple[Transformation] | None
|
The transform of the arc |
None
|
arrowhead_fill
|
NoneValueType | Color | None
|
|
Color(red=255, green=255, blue=255, alpha=1.0)
|
arrowhead_filter
|
NoneValueType | Filter | None
|
The arrowhead filter of the arc |
None
|
arrowhead_stroke
|
NoneValueType | Color | None
|
|
Color(red=0, green=0, blue=0, alpha=1.0)
|
arrowhead_stroke_dasharray
|
tuple[float, ...] | None
|
The arrowhead stroke dasharray of the arc |
None
|
arrowhead_stroke_dashoffset
|
float | None
|
The arrowhead stroke dashoffset of the arc |
None
|
arrowhead_stroke_width
|
float | None
|
|
1.25
|
arrowhead_transform
|
NoneValueType | tuple[Transformation] | None
|
The arrowhead transform of the arc |
None
|
arrowhead_height
|
float
|
|
10.0
|
Methods:
| Name | Description |
|---|---|
anchor_point |
Return an anchor point of the layout element |
arrowhead_base |
Return the arrowhead base anchor point of the single-headed arc |
arrowhead_bbox |
Return the bounding box of the single-headed arc arrowhead |
arrowhead_border |
Return the point at the intersection of the drawing elements of the single-headed arc arrowhead and the line going through the center of these drawing elements and the given point. |
arrowhead_drawing_elements |
Return the drawing elements of the single-headed arc arrowhead |
arrowhead_length |
Return the length of the single-headed arc arrowhead |
arrowhead_tip |
Return the arrowhead tip anchor point of the single-headed arc |
bbox |
Compute and return the bounding box of the group layout element |
childless |
Return a copy of the arc with no children |
children |
Return the children of the group layout. |
contains |
Return |
descendants |
Return the descendants of the layout element |
drawing_elements |
Return the drawing elements of the group layout. |
end_point |
Return the ending point of the arc |
equals |
Return |
flattened |
Return a list containing copy of the layout element with no children and all its descendants with no children |
fraction |
Return the position and angle on the arc at a given fraction (of the total arc length) |
length |
Return the total length of the arc path |
path_drawing_elements |
Return the drawing elements of the single-headed arc path |
points |
Return the points of the arc path |
self_bbox |
Compute and return the bounding box of the self drawing element of the group layout |
self_children |
Return the self children of the arc |
self_drawing_elements |
Return the self drawing elements of the single-headed arc |
self_to_shapely |
Compute and return a shapely collection of geometries reproducing the self drawing elements of the group layout |
start_point |
Return the starting point of the arc |
to_shapely |
Return a shapely collection of geometries reproducing the drawing elements of the layout element |
anchor_point
anchor_point(anchor_name: str) -> Point
arrowhead_base
arrowhead_base() -> Point
Return the arrowhead base anchor point of the single-headed arc
Source code in src/momapy/core.py
arrowhead_border
arrowhead_border(point) -> Point
Return the point at the intersection of the drawing elements of the single-headed arc arrowhead and the line going through the center of these drawing elements and the given point. When there are multiple intersection points, the one closest to the given point is returned
Source code in src/momapy/core.py
arrowhead_drawing_elements
arrowhead_drawing_elements() -> list[DrawingElement]
Return the drawing elements of the single-headed arc arrowhead
Source code in src/momapy/core.py
arrowhead_length
Return the length of the single-headed arc arrowhead
Source code in src/momapy/core.py
arrowhead_tip
arrowhead_tip() -> Point
Return the arrowhead tip anchor point of the single-headed arc
Source code in src/momapy/core.py
bbox
bbox() -> Bbox
Compute and return the bounding box of the group layout element
Source code in src/momapy/core.py
childless
children
children() -> list[LayoutElement]
Return the children of the group layout.
These are the self children of the group layout (returned by the self_children method) and the other children of the group layout (given by the layout_elements attribute)
Source code in src/momapy/core.py
contains
contains(other: LayoutElement) -> bool
Return true if another layout element is a descendant of the layout element, false otherwise
drawing_elements
drawing_elements() -> list[DrawingElement]
Return the drawing elements of the group layout. The returned drawing elements are a group drawing element formed of the self drawing elements of the group layout and the drawing elements of its children
Source code in src/momapy/core.py
end_point
end_point() -> Point
equals
equals(
other: LayoutElement,
flattened: bool = False,
unordered: bool = False,
) -> bool
Return true if the layout element is equal to another layout element, false otherwise
Source code in src/momapy/core.py
flattened
flattened() -> list[LayoutElement]
Return a list containing copy of the layout element with no children and all its descendants with no children
Source code in src/momapy/core.py
fraction
fraction(fraction: float) -> tuple[Point, float]
Return the position and angle on the arc at a given fraction (of the total arc length)
Source code in src/momapy/core.py
length
path_drawing_elements
path_drawing_elements() -> list[Path]
Return the drawing elements of the single-headed arc path
Source code in src/momapy/core.py
points
points() -> list[Point]
self_bbox
self_bbox() -> Bbox
Compute and return the bounding box of the self drawing element of the group layout
self_children
self_children() -> list[LayoutElement]
self_drawing_elements
self_drawing_elements() -> list[DrawingElement]
Return the self drawing elements of the single-headed arc
Source code in src/momapy/core.py
self_to_shapely
Compute and return a shapely collection of geometries reproducing the self drawing elements of the group layout
start_point
start_point() -> Point
to_shapely
Return a shapely collection of geometries reproducing the drawing elements of the layout element
Source code in src/momapy/core.py
NotOperator
dataclass
NotOperator(
*,
id_: str = make_uuid4_as_str(),
inputs: frozenset[LogicalOperatorInput] = frozenset(),
)
Bases: LogicalOperator
Class for not operators
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id_
|
str
|
The id of the map element. This id is purely for the user to keep track of the element, it does not need to be unique and is not part of the identity of the element, i.e., it is not considered when testing for equality between two map elements or when hashing the map element |
'341fa8af-cdf4-41ff-aaef-b64c4273b5c8'
|
inputs
|
frozenset[LogicalOperatorInput]
|
frozenset() -> empty frozenset object frozenset(iterable) -> frozenset object Build an immutable unordered collection of unique elements. |
<class 'frozenset'>
|
NotOperatorLayout
dataclass
NotOperatorLayout(
fill: NoneValueType | Color | None = white,
stroke: NoneValueType | Color | None = black,
stroke_width: float | None = 1.25,
*,
id_: str = make_uuid4_as_str(),
layout_elements: tuple[LayoutElement] = tuple(),
group_fill: NoneValueType | Color | None = None,
group_fill_rule: FillRule | None = None,
group_filter: NoneValueType | Filter | None = None,
group_font_family: str | None = None,
group_font_size: float | None = None,
group_font_style: FontStyle | None = None,
group_font_weight: FontWeight | float | None = None,
group_stroke: NoneValueType | Color | None = None,
group_stroke_dasharray: tuple[float, ...] | None = None,
group_stroke_dashoffset: float | None = None,
group_stroke_width: float | None = None,
group_text_anchor: TextAnchor | None = None,
group_transform: NoneValueType
| tuple[Transformation]
| None = None,
filter: NoneValueType | Filter | None = None,
height: float = 30.0,
label: TextLayout | None = None,
position: Point,
stroke_dasharray: tuple[float, ...] | None = None,
stroke_dashoffset: float | None = None,
transform: NoneValueType
| tuple[Transformation]
| None = None,
width: float = 30.0,
direction: Direction = HORIZONTAL,
left_to_right: bool = True,
left_connector_length: float = 10.0,
right_connector_length: float = 10.0,
left_connector_stroke: NoneValueType
| Color
| None = None,
left_connector_stroke_width: float | None = None,
left_connector_stroke_dasharray: NoneValueType
| tuple[float]
| None = None,
left_connector_stroke_dashoffset: float | None = None,
left_connector_fill: NoneValueType
| Color
| None = None,
left_connector_transform: NoneValueType
| tuple[Transformation]
| None = None,
left_connector_filter: NoneValueType
| Filter
| None = None,
right_connector_stroke: NoneValueType
| Color
| None = None,
right_connector_stroke_width: float | None = None,
right_connector_stroke_dasharray: NoneValueType
| tuple[float]
| None = None,
right_connector_stroke_dashoffset: float | None = None,
right_connector_fill: NoneValueType
| Color
| None = None,
right_connector_transform: NoneValueType
| tuple[Transformation]
| None = None,
right_connector_filter: NoneValueType
| Filter
| None = None,
)
Bases: _ConnectorsMixin, _SimpleMixin, _TextMixin, SBGNNode
Class for not operator layouts
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id_
|
str
|
The id of the map element. This id is purely for the user to keep track of the element, it does not need to be unique and is not part of the identity of the element, i.e., it is not considered when testing for equality between two map elements or when hashing the map element |
'c2b81284-0085-45d7-a522-c14dbdf11161'
|
layout_elements
|
tuple[LayoutElement]
|
The sub-layout elements of the group layout. These are part of the children of the group layout |
<dynamic>
|
group_fill
|
NoneValueType | Color | None
|
The fill color of the group layout |
None
|
group_fill_rule
|
FillRule | None
|
The fill rule of the group layout |
None
|
group_filter
|
NoneValueType | Filter | None
|
The filter of the group layout |
None
|
group_font_family
|
str | None
|
The font family of the group layout |
None
|
group_font_size
|
float | None
|
The font size of the group layout |
None
|
group_font_style
|
FontStyle | None
|
The font style of the group layout |
None
|
group_font_weight
|
FontWeight | float | None
|
The font weight of the group layout |
None
|
group_stroke
|
NoneValueType | Color | None
|
The stroke color of the group layout |
None
|
group_stroke_dasharray
|
tuple[float, ...] | None
|
The stroke dasharray of the group layout |
None
|
group_stroke_dashoffset
|
float | None
|
The stroke dashoffset of the group layout |
None
|
group_stroke_width
|
float | None
|
The stroke width of the group layout |
None
|
group_text_anchor
|
TextAnchor | None
|
The text anchor of the group layout |
None
|
group_transform
|
NoneValueType | tuple[Transformation] | None
|
The transform of the group layout |
None
|
fill
|
NoneValueType | Color | None
|
|
Color(red=255, green=255, blue=255, alpha=1.0)
|
filter
|
NoneValueType | Filter | None
|
The filter of the node |
None
|
height
|
float
|
|
30.0
|
label
|
TextLayout | None
|
The label of the node |
None
|
position
|
Point
|
The position of the node |
required |
stroke
|
NoneValueType | Color | None
|
|
Color(red=0, green=0, blue=0, alpha=1.0)
|
stroke_dasharray
|
tuple[float, ...] | None
|
The stroke dasharray of the node |
None
|
stroke_dashoffset
|
float | None
|
The stroke dashoffset of the node |
None
|
stroke_width
|
float | None
|
|
1.25
|
transform
|
NoneValueType | tuple[Transformation] | None
|
The transform of the node |
None
|
width
|
float
|
|
30.0
|
direction
|
Direction
|
|
<Direction.HORIZONTAL: 1>
|
left_to_right
|
bool
|
|
True
|
left_connector_length
|
float
|
|
10.0
|
right_connector_length
|
float
|
|
10.0
|
left_connector_stroke
|
NoneValueType | Color | None
|
|
None
|
left_connector_stroke_width
|
float | None
|
|
None
|
left_connector_stroke_dasharray
|
NoneValueType | tuple[float] | None
|
|
None
|
left_connector_stroke_dashoffset
|
float | None
|
|
None
|
left_connector_fill
|
NoneValueType | Color | None
|
|
None
|
left_connector_transform
|
NoneValueType | tuple[Transformation] | None
|
|
None
|
left_connector_filter
|
NoneValueType | Filter | None
|
|
None
|
right_connector_stroke
|
NoneValueType | Color | None
|
|
None
|
right_connector_stroke_width
|
float | None
|
|
None
|
right_connector_stroke_dasharray
|
NoneValueType | tuple[float] | None
|
|
None
|
right_connector_stroke_dashoffset
|
float | None
|
|
None
|
right_connector_fill
|
NoneValueType | Color | None
|
|
None
|
right_connector_transform
|
NoneValueType | tuple[Transformation] | None
|
|
None
|
right_connector_filter
|
NoneValueType | Filter | None
|
|
None
|
Methods:
| Name | Description |
|---|---|
anchor_point |
Return an anchor point of the layout element |
angle |
Return the point on the border of the node that intersects the drawing elements of the node with the line passing through the center anchor point of the node and at a given angle from the horizontal. |
bbox |
Compute and return the bounding box of the group layout element |
border |
Return the point on the border of the node that intersects the drawing elements of the node with the line formed of the center anchor point of the node and the given point. |
center |
Return the center anchor of the node |
childless |
Return a copy of the node with no children |
children |
Return the children of the group layout. |
contains |
Return |
descendants |
Return the descendants of the layout element |
drawing_elements |
Return the drawing elements of the group layout. |
east_north_east |
Return the east north east anchor of the node |
east_south_east |
Return the east south east west anchor of the node |
equals |
Return |
flattened |
Return a list containing copy of the layout element with no children and all its descendants with no children |
label_center |
Return the label center anchor of the node |
north_east |
Return the north east anchor of the node |
north_north_east |
Return the north north east anchor of the node |
north_north_west |
Return the north north west anchor of the node |
north_west |
Return the north west anchor of the node |
self_angle |
Return the point on the border of the node that intersects the self drawing elements of the node with the line passing through the center anchor point of the node and at a given angle from the horizontal. |
self_bbox |
Compute and return the bounding box of the self drawing element of the group layout |
self_border |
Return the point on the border of the node that intersects the self drawing elements of the node with the line formed of the center anchor point of the node and the given point. |
self_children |
Return the self children of the node. A node has unique child that is its label |
self_drawing_elements |
Return the node's own drawing elements |
self_to_shapely |
Compute and return a shapely collection of geometries reproducing the self drawing elements of the group layout |
size |
Return the size of the node |
south_east |
Return the south east anchor of the node |
south_south_east |
Return the south south east anchor of the node |
south_south_west |
Return the south south west anchor of the node |
south_west |
Return the south west anchor of the node |
to_shapely |
Return a shapely collection of geometries reproducing the drawing elements of the layout element |
west_north_west |
Return the west north west anchor of the node |
west_south_west |
Return the west south west anchor of the node |
Attributes:
| Name | Type | Description |
|---|---|---|
x |
float
|
Return the x coordinate of the node |
y |
float
|
Return the y coordinate of the node |
anchor_point
anchor_point(anchor_name: str) -> Point
angle
angle(
angle: float,
unit: Literal["degrees", "radians"] = "degrees",
) -> Point
Return the point on the border of the node that intersects the drawing elements of the node with the line passing through the center anchor point of the node and at a given angle from the horizontal.
Source code in src/momapy/core.py
bbox
bbox() -> Bbox
Compute and return the bounding box of the group layout element
Source code in src/momapy/core.py
border
Return the point on the border of the node that intersects the drawing elements of the node with the line formed of the center anchor point of the node and the given point. When there are multiple intersection points, the one closest to the given point is returned
Source code in src/momapy/core.py
center
center() -> Point
childless
children
children() -> list[LayoutElement]
Return the children of the group layout.
These are the self children of the group layout (returned by the self_children method) and the other children of the group layout (given by the layout_elements attribute)
Source code in src/momapy/core.py
contains
contains(other: LayoutElement) -> bool
Return true if another layout element is a descendant of the layout element, false otherwise
drawing_elements
drawing_elements() -> list[DrawingElement]
Return the drawing elements of the group layout. The returned drawing elements are a group drawing element formed of the self drawing elements of the group layout and the drawing elements of its children
Source code in src/momapy/core.py
east_north_east
east_north_east() -> Point
Return the east north east anchor of the node
Source code in src/momapy/core.py
east_south_east
east_south_east() -> Point
Return the east south east west anchor of the node
Source code in src/momapy/core.py
equals
equals(
other: LayoutElement,
flattened: bool = False,
unordered: bool = False,
) -> bool
Return true if the layout element is equal to another layout element, false otherwise
Source code in src/momapy/core.py
flattened
flattened() -> list[LayoutElement]
Return a list containing copy of the layout element with no children and all its descendants with no children
Source code in src/momapy/core.py
label_center
label_center() -> Point
north_east
north_east() -> Point
Return the north east anchor of the node
Source code in src/momapy/core.py
north_north_east
north_north_east() -> Point
Return the north north east anchor of the node
Source code in src/momapy/core.py
north_north_west
north_north_west() -> Point
Return the north north west anchor of the node
Source code in src/momapy/core.py
north_west
north_west() -> Point
Return the north west anchor of the node
Source code in src/momapy/core.py
self_angle
self_angle(
angle: float,
unit: Literal["degrees", "radians"] = "degrees",
) -> Point
Return the point on the border of the node that intersects the self drawing elements of the node with the line passing through the center anchor point of the node and at a given angle from the horizontal.
Source code in src/momapy/core.py
self_bbox
self_bbox() -> Bbox
Compute and return the bounding box of the self drawing element of the group layout
self_border
Return the point on the border of the node that intersects the self drawing elements of the node with the line formed of the center anchor point of the node and the given point. When there are multiple intersection points, the one closest to the given point is returned
Source code in src/momapy/core.py
self_children
self_children() -> list[LayoutElement]
Return the self children of the node. A node has unique child that is its label
self_drawing_elements
self_drawing_elements() -> list[DrawingElement]
Return the node's own drawing elements
Source code in src/momapy/core.py
self_to_shapely
Compute and return a shapely collection of geometries reproducing the self drawing elements of the group layout
size
south_east
south_east() -> Point
Return the south east anchor of the node
Source code in src/momapy/core.py
south_south_east
south_south_east() -> Point
Return the south south east anchor of the node
Source code in src/momapy/core.py
south_south_west
south_south_west() -> Point
Return the south south west anchor of the node
Source code in src/momapy/core.py
south_west
south_west() -> Point
Return the south west anchor of the node
Source code in src/momapy/core.py
to_shapely
Return a shapely collection of geometries reproducing the drawing elements of the layout element
Source code in src/momapy/core.py
west_north_west
west_north_west() -> Point
Return the west north west anchor of the node
Source code in src/momapy/core.py
west_south_west
west_south_west() -> Point
Return the west south west anchor of the node
Source code in src/momapy/core.py
NucleicAcidFeatureUnitOfInformation
dataclass
NucleicAcidFeatureUnitOfInformation(
*,
id_: str = make_uuid4_as_str(),
label: Optional[str] = None,
)
Bases: UnitOfInformation
Class for nucleic acid feature units of information
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id_
|
str
|
The id of the map element. This id is purely for the user to keep track of the element, it does not need to be unique and is not part of the identity of the element, i.e., it is not considered when testing for equality between two map elements or when hashing the map element |
'51b8cf42-3805-43da-8f99-53d36aff3544'
|
label
|
str | None
|
|
None
|
NucleicAcidFeatureUnitOfInformationLayout
dataclass
NucleicAcidFeatureUnitOfInformationLayout(
fill: NoneValueType | Color | None = white,
stroke: NoneValueType | Color | None = black,
stroke_width: float | None = 1.25,
*,
id_: str = make_uuid4_as_str(),
layout_elements: tuple[LayoutElement] = tuple(),
group_fill: NoneValueType | Color | None = None,
group_fill_rule: FillRule | None = None,
group_filter: NoneValueType | Filter | None = None,
group_font_family: str | None = None,
group_font_size: float | None = None,
group_font_style: FontStyle | None = None,
group_font_weight: FontWeight | float | None = None,
group_stroke: NoneValueType | Color | None = None,
group_stroke_dasharray: tuple[float, ...] | None = None,
group_stroke_dashoffset: float | None = None,
group_stroke_width: float | None = None,
group_text_anchor: TextAnchor | None = None,
group_transform: NoneValueType
| tuple[Transformation]
| None = None,
filter: NoneValueType | Filter | None = None,
height: float = 12.0,
label: TextLayout | None = None,
position: Point,
stroke_dasharray: tuple[float, ...] | None = None,
stroke_dashoffset: float | None = None,
transform: NoneValueType
| tuple[Transformation]
| None = None,
width: float = 12.0,
rounded_corners: float = 5.0,
)
Bases: _SimpleMixin, SBGNNode
Class for nucleic acid feature unit of information layouts
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id_
|
str
|
The id of the map element. This id is purely for the user to keep track of the element, it does not need to be unique and is not part of the identity of the element, i.e., it is not considered when testing for equality between two map elements or when hashing the map element |
'361c647e-549c-4a07-8014-f5e712864c4c'
|
layout_elements
|
tuple[LayoutElement]
|
The sub-layout elements of the group layout. These are part of the children of the group layout |
<dynamic>
|
group_fill
|
NoneValueType | Color | None
|
The fill color of the group layout |
None
|
group_fill_rule
|
FillRule | None
|
The fill rule of the group layout |
None
|
group_filter
|
NoneValueType | Filter | None
|
The filter of the group layout |
None
|
group_font_family
|
str | None
|
The font family of the group layout |
None
|
group_font_size
|
float | None
|
The font size of the group layout |
None
|
group_font_style
|
FontStyle | None
|
The font style of the group layout |
None
|
group_font_weight
|
FontWeight | float | None
|
The font weight of the group layout |
None
|
group_stroke
|
NoneValueType | Color | None
|
The stroke color of the group layout |
None
|
group_stroke_dasharray
|
tuple[float, ...] | None
|
The stroke dasharray of the group layout |
None
|
group_stroke_dashoffset
|
float | None
|
The stroke dashoffset of the group layout |
None
|
group_stroke_width
|
float | None
|
The stroke width of the group layout |
None
|
group_text_anchor
|
TextAnchor | None
|
The text anchor of the group layout |
None
|
group_transform
|
NoneValueType | tuple[Transformation] | None
|
The transform of the group layout |
None
|
fill
|
NoneValueType | Color | None
|
|
Color(red=255, green=255, blue=255, alpha=1.0)
|
filter
|
NoneValueType | Filter | None
|
The filter of the node |
None
|
height
|
float
|
|
12.0
|
label
|
TextLayout | None
|
The label of the node |
None
|
position
|
Point
|
The position of the node |
required |
stroke
|
NoneValueType | Color | None
|
|
Color(red=0, green=0, blue=0, alpha=1.0)
|
stroke_dasharray
|
tuple[float, ...] | None
|
The stroke dasharray of the node |
None
|
stroke_dashoffset
|
float | None
|
The stroke dashoffset of the node |
None
|
stroke_width
|
float | None
|
|
1.25
|
transform
|
NoneValueType | tuple[Transformation] | None
|
The transform of the node |
None
|
width
|
float
|
|
12.0
|
rounded_corners
|
float
|
|
5.0
|
Methods:
| Name | Description |
|---|---|
anchor_point |
Return an anchor point of the layout element |
angle |
Return the point on the border of the node that intersects the drawing elements of the node with the line passing through the center anchor point of the node and at a given angle from the horizontal. |
bbox |
Compute and return the bounding box of the group layout element |
border |
Return the point on the border of the node that intersects the drawing elements of the node with the line formed of the center anchor point of the node and the given point. |
center |
Return the center anchor of the node |
childless |
Return a copy of the node with no children |
children |
Return the children of the group layout. |
contains |
Return |
descendants |
Return the descendants of the layout element |
drawing_elements |
Return the drawing elements of the group layout. |
east |
Return the east anchor of the node |
east_north_east |
Return the east north east anchor of the node |
east_south_east |
Return the east south east west anchor of the node |
equals |
Return |
flattened |
Return a list containing copy of the layout element with no children and all its descendants with no children |
label_center |
Return the label center anchor of the node |
north |
Return the north anchor of the node |
north_east |
Return the north east anchor of the node |
north_north_east |
Return the north north east anchor of the node |
north_north_west |
Return the north north west anchor of the node |
north_west |
Return the north west anchor of the node |
self_angle |
Return the point on the border of the node that intersects the self drawing elements of the node with the line passing through the center anchor point of the node and at a given angle from the horizontal. |
self_bbox |
Compute and return the bounding box of the self drawing element of the group layout |
self_border |
Return the point on the border of the node that intersects the self drawing elements of the node with the line formed of the center anchor point of the node and the given point. |
self_children |
Return the self children of the node. A node has unique child that is its label |
self_drawing_elements |
Return the node's own drawing elements |
self_to_shapely |
Compute and return a shapely collection of geometries reproducing the self drawing elements of the group layout |
size |
Return the size of the node |
south |
Return the south anchor of the node |
south_east |
Return the south east anchor of the node |
south_south_east |
Return the south south east anchor of the node |
south_south_west |
Return the south south west anchor of the node |
south_west |
Return the south west anchor of the node |
to_shapely |
Return a shapely collection of geometries reproducing the drawing elements of the layout element |
west |
Return the west anchor of the node |
west_north_west |
Return the west north west anchor of the node |
west_south_west |
Return the west south west anchor of the node |
Attributes:
| Name | Type | Description |
|---|---|---|
x |
float
|
Return the x coordinate of the node |
y |
float
|
Return the y coordinate of the node |
anchor_point
anchor_point(anchor_name: str) -> Point
angle
angle(
angle: float,
unit: Literal["degrees", "radians"] = "degrees",
) -> Point
Return the point on the border of the node that intersects the drawing elements of the node with the line passing through the center anchor point of the node and at a given angle from the horizontal.
Source code in src/momapy/core.py
bbox
bbox() -> Bbox
Compute and return the bounding box of the group layout element
Source code in src/momapy/core.py
border
Return the point on the border of the node that intersects the drawing elements of the node with the line formed of the center anchor point of the node and the given point. When there are multiple intersection points, the one closest to the given point is returned
Source code in src/momapy/core.py
center
center() -> Point
childless
children
children() -> list[LayoutElement]
Return the children of the group layout.
These are the self children of the group layout (returned by the self_children method) and the other children of the group layout (given by the layout_elements attribute)
Source code in src/momapy/core.py
contains
contains(other: LayoutElement) -> bool
Return true if another layout element is a descendant of the layout element, false otherwise
drawing_elements
drawing_elements() -> list[DrawingElement]
Return the drawing elements of the group layout. The returned drawing elements are a group drawing element formed of the self drawing elements of the group layout and the drawing elements of its children
Source code in src/momapy/core.py
east
east() -> Point
east_north_east
east_north_east() -> Point
Return the east north east anchor of the node
Source code in src/momapy/core.py
east_south_east
east_south_east() -> Point
Return the east south east west anchor of the node
Source code in src/momapy/core.py
equals
equals(
other: LayoutElement,
flattened: bool = False,
unordered: bool = False,
) -> bool
Return true if the layout element is equal to another layout element, false otherwise
Source code in src/momapy/core.py
flattened
flattened() -> list[LayoutElement]
Return a list containing copy of the layout element with no children and all its descendants with no children
Source code in src/momapy/core.py
label_center
label_center() -> Point
north
north() -> Point
north_east
north_east() -> Point
Return the north east anchor of the node
Source code in src/momapy/core.py
north_north_east
north_north_east() -> Point
Return the north north east anchor of the node
Source code in src/momapy/core.py
north_north_west
north_north_west() -> Point
Return the north north west anchor of the node
Source code in src/momapy/core.py
north_west
north_west() -> Point
Return the north west anchor of the node
Source code in src/momapy/core.py
self_angle
self_angle(
angle: float,
unit: Literal["degrees", "radians"] = "degrees",
) -> Point
Return the point on the border of the node that intersects the self drawing elements of the node with the line passing through the center anchor point of the node and at a given angle from the horizontal.
Source code in src/momapy/core.py
self_bbox
self_bbox() -> Bbox
Compute and return the bounding box of the self drawing element of the group layout
self_border
Return the point on the border of the node that intersects the self drawing elements of the node with the line formed of the center anchor point of the node and the given point. When there are multiple intersection points, the one closest to the given point is returned
Source code in src/momapy/core.py
self_children
self_children() -> list[LayoutElement]
Return the self children of the node. A node has unique child that is its label
self_drawing_elements
self_drawing_elements() -> list[DrawingElement]
Return the node's own drawing elements
Source code in src/momapy/core.py
self_to_shapely
Compute and return a shapely collection of geometries reproducing the self drawing elements of the group layout
size
south
south() -> Point
south_east
south_east() -> Point
Return the south east anchor of the node
Source code in src/momapy/core.py
south_south_east
south_south_east() -> Point
Return the south south east anchor of the node
Source code in src/momapy/core.py
south_south_west
south_south_west() -> Point
Return the south south west anchor of the node
Source code in src/momapy/core.py
south_west
south_west() -> Point
Return the south west anchor of the node
Source code in src/momapy/core.py
to_shapely
Return a shapely collection of geometries reproducing the drawing elements of the layout element
Source code in src/momapy/core.py
west
west() -> Point
west_north_west
west_north_west() -> Point
Return the west north west anchor of the node
Source code in src/momapy/core.py
west_south_west
west_south_west() -> Point
Return the west south west anchor of the node
Source code in src/momapy/core.py
OrOperator
dataclass
OrOperator(
*,
id_: str = make_uuid4_as_str(),
inputs: frozenset[LogicalOperatorInput] = frozenset(),
)
Bases: LogicalOperator
Class for or operators
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id_
|
str
|
The id of the map element. This id is purely for the user to keep track of the element, it does not need to be unique and is not part of the identity of the element, i.e., it is not considered when testing for equality between two map elements or when hashing the map element |
'71c9755e-efee-4a83-b18b-40e21bde664d'
|
inputs
|
frozenset[LogicalOperatorInput]
|
frozenset() -> empty frozenset object frozenset(iterable) -> frozenset object Build an immutable unordered collection of unique elements. |
<class 'frozenset'>
|
OrOperatorLayout
dataclass
OrOperatorLayout(
fill: NoneValueType | Color | None = white,
stroke: NoneValueType | Color | None = black,
stroke_width: float | None = 1.25,
*,
id_: str = make_uuid4_as_str(),
layout_elements: tuple[LayoutElement] = tuple(),
group_fill: NoneValueType | Color | None = None,
group_fill_rule: FillRule | None = None,
group_filter: NoneValueType | Filter | None = None,
group_font_family: str | None = None,
group_font_size: float | None = None,
group_font_style: FontStyle | None = None,
group_font_weight: FontWeight | float | None = None,
group_stroke: NoneValueType | Color | None = None,
group_stroke_dasharray: tuple[float, ...] | None = None,
group_stroke_dashoffset: float | None = None,
group_stroke_width: float | None = None,
group_text_anchor: TextAnchor | None = None,
group_transform: NoneValueType
| tuple[Transformation]
| None = None,
filter: NoneValueType | Filter | None = None,
height: float = 30.0,
label: TextLayout | None = None,
position: Point,
stroke_dasharray: tuple[float, ...] | None = None,
stroke_dashoffset: float | None = None,
transform: NoneValueType
| tuple[Transformation]
| None = None,
width: float = 30.0,
direction: Direction = HORIZONTAL,
left_to_right: bool = True,
left_connector_length: float = 10.0,
right_connector_length: float = 10.0,
left_connector_stroke: NoneValueType
| Color
| None = None,
left_connector_stroke_width: float | None = None,
left_connector_stroke_dasharray: NoneValueType
| tuple[float]
| None = None,
left_connector_stroke_dashoffset: float | None = None,
left_connector_fill: NoneValueType
| Color
| None = None,
left_connector_transform: NoneValueType
| tuple[Transformation]
| None = None,
left_connector_filter: NoneValueType
| Filter
| None = None,
right_connector_stroke: NoneValueType
| Color
| None = None,
right_connector_stroke_width: float | None = None,
right_connector_stroke_dasharray: NoneValueType
| tuple[float]
| None = None,
right_connector_stroke_dashoffset: float | None = None,
right_connector_fill: NoneValueType
| Color
| None = None,
right_connector_transform: NoneValueType
| tuple[Transformation]
| None = None,
right_connector_filter: NoneValueType
| Filter
| None = None,
)
Bases: _ConnectorsMixin, _SimpleMixin, _TextMixin, SBGNNode
Class for or operator layouts
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id_
|
str
|
The id of the map element. This id is purely for the user to keep track of the element, it does not need to be unique and is not part of the identity of the element, i.e., it is not considered when testing for equality between two map elements or when hashing the map element |
'1f2978d3-d3a0-4398-8e29-ac4e90013e4e'
|
layout_elements
|
tuple[LayoutElement]
|
The sub-layout elements of the group layout. These are part of the children of the group layout |
<dynamic>
|
group_fill
|
NoneValueType | Color | None
|
The fill color of the group layout |
None
|
group_fill_rule
|
FillRule | None
|
The fill rule of the group layout |
None
|
group_filter
|
NoneValueType | Filter | None
|
The filter of the group layout |
None
|
group_font_family
|
str | None
|
The font family of the group layout |
None
|
group_font_size
|
float | None
|
The font size of the group layout |
None
|
group_font_style
|
FontStyle | None
|
The font style of the group layout |
None
|
group_font_weight
|
FontWeight | float | None
|
The font weight of the group layout |
None
|
group_stroke
|
NoneValueType | Color | None
|
The stroke color of the group layout |
None
|
group_stroke_dasharray
|
tuple[float, ...] | None
|
The stroke dasharray of the group layout |
None
|
group_stroke_dashoffset
|
float | None
|
The stroke dashoffset of the group layout |
None
|
group_stroke_width
|
float | None
|
The stroke width of the group layout |
None
|
group_text_anchor
|
TextAnchor | None
|
The text anchor of the group layout |
None
|
group_transform
|
NoneValueType | tuple[Transformation] | None
|
The transform of the group layout |
None
|
fill
|
NoneValueType | Color | None
|
|
Color(red=255, green=255, blue=255, alpha=1.0)
|
filter
|
NoneValueType | Filter | None
|
The filter of the node |
None
|
height
|
float
|
|
30.0
|
label
|
TextLayout | None
|
The label of the node |
None
|
position
|
Point
|
The position of the node |
required |
stroke
|
NoneValueType | Color | None
|
|
Color(red=0, green=0, blue=0, alpha=1.0)
|
stroke_dasharray
|
tuple[float, ...] | None
|
The stroke dasharray of the node |
None
|
stroke_dashoffset
|
float | None
|
The stroke dashoffset of the node |
None
|
stroke_width
|
float | None
|
|
1.25
|
transform
|
NoneValueType | tuple[Transformation] | None
|
The transform of the node |
None
|
width
|
float
|
|
30.0
|
direction
|
Direction
|
|
<Direction.HORIZONTAL: 1>
|
left_to_right
|
bool
|
|
True
|
left_connector_length
|
float
|
|
10.0
|
right_connector_length
|
float
|
|
10.0
|
left_connector_stroke
|
NoneValueType | Color | None
|
|
None
|
left_connector_stroke_width
|
float | None
|
|
None
|
left_connector_stroke_dasharray
|
NoneValueType | tuple[float] | None
|
|
None
|
left_connector_stroke_dashoffset
|
float | None
|
|
None
|
left_connector_fill
|
NoneValueType | Color | None
|
|
None
|
left_connector_transform
|
NoneValueType | tuple[Transformation] | None
|
|
None
|
left_connector_filter
|
NoneValueType | Filter | None
|
|
None
|
right_connector_stroke
|
NoneValueType | Color | None
|
|
None
|
right_connector_stroke_width
|
float | None
|
|
None
|
right_connector_stroke_dasharray
|
NoneValueType | tuple[float] | None
|
|
None
|
right_connector_stroke_dashoffset
|
float | None
|
|
None
|
right_connector_fill
|
NoneValueType | Color | None
|
|
None
|
right_connector_transform
|
NoneValueType | tuple[Transformation] | None
|
|
None
|
right_connector_filter
|
NoneValueType | Filter | None
|
|
None
|
Methods:
| Name | Description |
|---|---|
anchor_point |
Return an anchor point of the layout element |
angle |
Return the point on the border of the node that intersects the drawing elements of the node with the line passing through the center anchor point of the node and at a given angle from the horizontal. |
bbox |
Compute and return the bounding box of the group layout element |
border |
Return the point on the border of the node that intersects the drawing elements of the node with the line formed of the center anchor point of the node and the given point. |
center |
Return the center anchor of the node |
childless |
Return a copy of the node with no children |
children |
Return the children of the group layout. |
contains |
Return |
descendants |
Return the descendants of the layout element |
drawing_elements |
Return the drawing elements of the group layout. |
east_north_east |
Return the east north east anchor of the node |
east_south_east |
Return the east south east west anchor of the node |
equals |
Return |
flattened |
Return a list containing copy of the layout element with no children and all its descendants with no children |
label_center |
Return the label center anchor of the node |
north_east |
Return the north east anchor of the node |
north_north_east |
Return the north north east anchor of the node |
north_north_west |
Return the north north west anchor of the node |
north_west |
Return the north west anchor of the node |
self_angle |
Return the point on the border of the node that intersects the self drawing elements of the node with the line passing through the center anchor point of the node and at a given angle from the horizontal. |
self_bbox |
Compute and return the bounding box of the self drawing element of the group layout |
self_border |
Return the point on the border of the node that intersects the self drawing elements of the node with the line formed of the center anchor point of the node and the given point. |
self_children |
Return the self children of the node. A node has unique child that is its label |
self_drawing_elements |
Return the node's own drawing elements |
self_to_shapely |
Compute and return a shapely collection of geometries reproducing the self drawing elements of the group layout |
size |
Return the size of the node |
south_east |
Return the south east anchor of the node |
south_south_east |
Return the south south east anchor of the node |
south_south_west |
Return the south south west anchor of the node |
south_west |
Return the south west anchor of the node |
to_shapely |
Return a shapely collection of geometries reproducing the drawing elements of the layout element |
west_north_west |
Return the west north west anchor of the node |
west_south_west |
Return the west south west anchor of the node |
Attributes:
| Name | Type | Description |
|---|---|---|
x |
float
|
Return the x coordinate of the node |
y |
float
|
Return the y coordinate of the node |
anchor_point
anchor_point(anchor_name: str) -> Point
angle
angle(
angle: float,
unit: Literal["degrees", "radians"] = "degrees",
) -> Point
Return the point on the border of the node that intersects the drawing elements of the node with the line passing through the center anchor point of the node and at a given angle from the horizontal.
Source code in src/momapy/core.py
bbox
bbox() -> Bbox
Compute and return the bounding box of the group layout element
Source code in src/momapy/core.py
border
Return the point on the border of the node that intersects the drawing elements of the node with the line formed of the center anchor point of the node and the given point. When there are multiple intersection points, the one closest to the given point is returned
Source code in src/momapy/core.py
center
center() -> Point
childless
children
children() -> list[LayoutElement]
Return the children of the group layout.
These are the self children of the group layout (returned by the self_children method) and the other children of the group layout (given by the layout_elements attribute)
Source code in src/momapy/core.py
contains
contains(other: LayoutElement) -> bool
Return true if another layout element is a descendant of the layout element, false otherwise
drawing_elements
drawing_elements() -> list[DrawingElement]
Return the drawing elements of the group layout. The returned drawing elements are a group drawing element formed of the self drawing elements of the group layout and the drawing elements of its children
Source code in src/momapy/core.py
east_north_east
east_north_east() -> Point
Return the east north east anchor of the node
Source code in src/momapy/core.py
east_south_east
east_south_east() -> Point
Return the east south east west anchor of the node
Source code in src/momapy/core.py
equals
equals(
other: LayoutElement,
flattened: bool = False,
unordered: bool = False,
) -> bool
Return true if the layout element is equal to another layout element, false otherwise
Source code in src/momapy/core.py
flattened
flattened() -> list[LayoutElement]
Return a list containing copy of the layout element with no children and all its descendants with no children
Source code in src/momapy/core.py
label_center
label_center() -> Point
north_east
north_east() -> Point
Return the north east anchor of the node
Source code in src/momapy/core.py
north_north_east
north_north_east() -> Point
Return the north north east anchor of the node
Source code in src/momapy/core.py
north_north_west
north_north_west() -> Point
Return the north north west anchor of the node
Source code in src/momapy/core.py
north_west
north_west() -> Point
Return the north west anchor of the node
Source code in src/momapy/core.py
self_angle
self_angle(
angle: float,
unit: Literal["degrees", "radians"] = "degrees",
) -> Point
Return the point on the border of the node that intersects the self drawing elements of the node with the line passing through the center anchor point of the node and at a given angle from the horizontal.
Source code in src/momapy/core.py
self_bbox
self_bbox() -> Bbox
Compute and return the bounding box of the self drawing element of the group layout
self_border
Return the point on the border of the node that intersects the self drawing elements of the node with the line formed of the center anchor point of the node and the given point. When there are multiple intersection points, the one closest to the given point is returned
Source code in src/momapy/core.py
self_children
self_children() -> list[LayoutElement]
Return the self children of the node. A node has unique child that is its label
self_drawing_elements
self_drawing_elements() -> list[DrawingElement]
Return the node's own drawing elements
Source code in src/momapy/core.py
self_to_shapely
Compute and return a shapely collection of geometries reproducing the self drawing elements of the group layout
size
south_east
south_east() -> Point
Return the south east anchor of the node
Source code in src/momapy/core.py
south_south_east
south_south_east() -> Point
Return the south south east anchor of the node
Source code in src/momapy/core.py
south_south_west
south_south_west() -> Point
Return the south south west anchor of the node
Source code in src/momapy/core.py
south_west
south_west() -> Point
Return the south west anchor of the node
Source code in src/momapy/core.py
to_shapely
Return a shapely collection of geometries reproducing the drawing elements of the layout element
Source code in src/momapy/core.py
west_north_west
west_north_west() -> Point
Return the west north west anchor of the node
Source code in src/momapy/core.py
west_south_west
west_south_west() -> Point
Return the west south west anchor of the node
Source code in src/momapy/core.py
PerturbationUnitOfInformation
dataclass
Bases: UnitOfInformation
Class for perturbation units of information
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id_
|
str
|
The id of the map element. This id is purely for the user to keep track of the element, it does not need to be unique and is not part of the identity of the element, i.e., it is not considered when testing for equality between two map elements or when hashing the map element |
'1a7e0270-ead0-45fc-aac9-f72e7d792cf8'
|
label
|
str | None
|
|
None
|
PerturbationUnitOfInformationLayout
dataclass
PerturbationUnitOfInformationLayout(
fill: NoneValueType | Color | None = white,
stroke: NoneValueType | Color | None = black,
stroke_width: float | None = 1.25,
*,
id_: str = make_uuid4_as_str(),
layout_elements: tuple[LayoutElement] = tuple(),
group_fill: NoneValueType | Color | None = None,
group_fill_rule: FillRule | None = None,
group_filter: NoneValueType | Filter | None = None,
group_font_family: str | None = None,
group_font_size: float | None = None,
group_font_style: FontStyle | None = None,
group_font_weight: FontWeight | float | None = None,
group_stroke: NoneValueType | Color | None = None,
group_stroke_dasharray: tuple[float, ...] | None = None,
group_stroke_dashoffset: float | None = None,
group_stroke_width: float | None = None,
group_text_anchor: TextAnchor | None = None,
group_transform: NoneValueType
| tuple[Transformation]
| None = None,
filter: NoneValueType | Filter | None = None,
height: float = 12.0,
label: TextLayout | None = None,
position: Point,
stroke_dasharray: tuple[float, ...] | None = None,
stroke_dashoffset: float | None = None,
transform: NoneValueType
| tuple[Transformation]
| None = None,
width: float = 12.0,
angle: float = 70.0,
)
Bases: _SimpleMixin, SBGNNode
Class for perturbation unit of information layouts
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id_
|
str
|
The id of the map element. This id is purely for the user to keep track of the element, it does not need to be unique and is not part of the identity of the element, i.e., it is not considered when testing for equality between two map elements or when hashing the map element |
'885b9dae-0851-4a8b-aad6-2837b53296e4'
|
layout_elements
|
tuple[LayoutElement]
|
The sub-layout elements of the group layout. These are part of the children of the group layout |
<dynamic>
|
group_fill
|
NoneValueType | Color | None
|
The fill color of the group layout |
None
|
group_fill_rule
|
FillRule | None
|
The fill rule of the group layout |
None
|
group_filter
|
NoneValueType | Filter | None
|
The filter of the group layout |
None
|
group_font_family
|
str | None
|
The font family of the group layout |
None
|
group_font_size
|
float | None
|
The font size of the group layout |
None
|
group_font_style
|
FontStyle | None
|
The font style of the group layout |
None
|
group_font_weight
|
FontWeight | float | None
|
The font weight of the group layout |
None
|
group_stroke
|
NoneValueType | Color | None
|
The stroke color of the group layout |
None
|
group_stroke_dasharray
|
tuple[float, ...] | None
|
The stroke dasharray of the group layout |
None
|
group_stroke_dashoffset
|
float | None
|
The stroke dashoffset of the group layout |
None
|
group_stroke_width
|
float | None
|
The stroke width of the group layout |
None
|
group_text_anchor
|
TextAnchor | None
|
The text anchor of the group layout |
None
|
group_transform
|
NoneValueType | tuple[Transformation] | None
|
The transform of the group layout |
None
|
fill
|
NoneValueType | Color | None
|
|
Color(red=255, green=255, blue=255, alpha=1.0)
|
filter
|
NoneValueType | Filter | None
|
The filter of the node |
None
|
height
|
float
|
|
12.0
|
label
|
TextLayout | None
|
The label of the node |
None
|
position
|
Point
|
The position of the node |
required |
stroke
|
NoneValueType | Color | None
|
|
Color(red=0, green=0, blue=0, alpha=1.0)
|
stroke_dasharray
|
tuple[float, ...] | None
|
The stroke dasharray of the node |
None
|
stroke_dashoffset
|
float | None
|
The stroke dashoffset of the node |
None
|
stroke_width
|
float | None
|
|
1.25
|
transform
|
NoneValueType | tuple[Transformation] | None
|
The transform of the node |
None
|
width
|
float
|
|
12.0
|
angle
|
float
|
|
70.0
|
Methods:
| Name | Description |
|---|---|
anchor_point |
Return an anchor point of the layout element |
bbox |
Compute and return the bounding box of the group layout element |
border |
Return the point on the border of the node that intersects the drawing elements of the node with the line formed of the center anchor point of the node and the given point. |
center |
Return the center anchor of the node |
childless |
Return a copy of the node with no children |
children |
Return the children of the group layout. |
contains |
Return |
descendants |
Return the descendants of the layout element |
drawing_elements |
Return the drawing elements of the group layout. |
east |
Return the east anchor of the node |
east_north_east |
Return the east north east anchor of the node |
east_south_east |
Return the east south east west anchor of the node |
equals |
Return |
flattened |
Return a list containing copy of the layout element with no children and all its descendants with no children |
label_center |
Return the label center anchor of the node |
north |
Return the north anchor of the node |
north_east |
Return the north east anchor of the node |
north_north_east |
Return the north north east anchor of the node |
north_north_west |
Return the north north west anchor of the node |
north_west |
Return the north west anchor of the node |
self_angle |
Return the point on the border of the node that intersects the self drawing elements of the node with the line passing through the center anchor point of the node and at a given angle from the horizontal. |
self_bbox |
Compute and return the bounding box of the self drawing element of the group layout |
self_border |
Return the point on the border of the node that intersects the self drawing elements of the node with the line formed of the center anchor point of the node and the given point. |
self_children |
Return the self children of the node. A node has unique child that is its label |
self_drawing_elements |
Return the node's own drawing elements |
self_to_shapely |
Compute and return a shapely collection of geometries reproducing the self drawing elements of the group layout |
size |
Return the size of the node |
south |
Return the south anchor of the node |
south_east |
Return the south east anchor of the node |
south_south_east |
Return the south south east anchor of the node |
south_south_west |
Return the south south west anchor of the node |
south_west |
Return the south west anchor of the node |
to_shapely |
Return a shapely collection of geometries reproducing the drawing elements of the layout element |
west |
Return the west anchor of the node |
west_north_west |
Return the west north west anchor of the node |
west_south_west |
Return the west south west anchor of the node |
Attributes:
| Name | Type | Description |
|---|---|---|
angle |
float
|
Return the point on the border of the node that intersects the drawing elements of the node with the line passing through the center anchor point of the node and at a given angle from the horizontal. |
x |
float
|
Return the x coordinate of the node |
y |
float
|
Return the y coordinate of the node |
anchor_point
anchor_point(anchor_name: str) -> Point
angle
class-attribute
instance-attribute
Return the point on the border of the node that intersects the drawing elements of the node with the line passing through the center anchor point of the node and at a given angle from the horizontal.
bbox
bbox() -> Bbox
Compute and return the bounding box of the group layout element
Source code in src/momapy/core.py
border
Return the point on the border of the node that intersects the drawing elements of the node with the line formed of the center anchor point of the node and the given point. When there are multiple intersection points, the one closest to the given point is returned
Source code in src/momapy/core.py
center
center() -> Point
childless
children
children() -> list[LayoutElement]
Return the children of the group layout.
These are the self children of the group layout (returned by the self_children method) and the other children of the group layout (given by the layout_elements attribute)
Source code in src/momapy/core.py
contains
contains(other: LayoutElement) -> bool
Return true if another layout element is a descendant of the layout element, false otherwise
drawing_elements
drawing_elements() -> list[DrawingElement]
Return the drawing elements of the group layout. The returned drawing elements are a group drawing element formed of the self drawing elements of the group layout and the drawing elements of its children
Source code in src/momapy/core.py
east
east() -> Point
east_north_east
east_north_east() -> Point
Return the east north east anchor of the node
Source code in src/momapy/core.py
east_south_east
east_south_east() -> Point
Return the east south east west anchor of the node
Source code in src/momapy/core.py
equals
equals(
other: LayoutElement,
flattened: bool = False,
unordered: bool = False,
) -> bool
Return true if the layout element is equal to another layout element, false otherwise
Source code in src/momapy/core.py
flattened
flattened() -> list[LayoutElement]
Return a list containing copy of the layout element with no children and all its descendants with no children
Source code in src/momapy/core.py
label_center
label_center() -> Point
north
north() -> Point
north_east
north_east() -> Point
Return the north east anchor of the node
Source code in src/momapy/core.py
north_north_east
north_north_east() -> Point
Return the north north east anchor of the node
Source code in src/momapy/core.py
north_north_west
north_north_west() -> Point
Return the north north west anchor of the node
Source code in src/momapy/core.py
north_west
north_west() -> Point
Return the north west anchor of the node
Source code in src/momapy/core.py
self_angle
self_angle(
angle: float,
unit: Literal["degrees", "radians"] = "degrees",
) -> Point
Return the point on the border of the node that intersects the self drawing elements of the node with the line passing through the center anchor point of the node and at a given angle from the horizontal.
Source code in src/momapy/core.py
self_bbox
self_bbox() -> Bbox
Compute and return the bounding box of the self drawing element of the group layout
self_border
Return the point on the border of the node that intersects the self drawing elements of the node with the line formed of the center anchor point of the node and the given point. When there are multiple intersection points, the one closest to the given point is returned
Source code in src/momapy/core.py
self_children
self_children() -> list[LayoutElement]
Return the self children of the node. A node has unique child that is its label
self_drawing_elements
self_drawing_elements() -> list[DrawingElement]
Return the node's own drawing elements
Source code in src/momapy/core.py
self_to_shapely
Compute and return a shapely collection of geometries reproducing the self drawing elements of the group layout
size
south
south() -> Point
south_east
south_east() -> Point
Return the south east anchor of the node
Source code in src/momapy/core.py
south_south_east
south_south_east() -> Point
Return the south south east anchor of the node
Source code in src/momapy/core.py
south_south_west
south_south_west() -> Point
Return the south south west anchor of the node
Source code in src/momapy/core.py
south_west
south_west() -> Point
Return the south west anchor of the node
Source code in src/momapy/core.py
to_shapely
Return a shapely collection of geometries reproducing the drawing elements of the layout element
Source code in src/momapy/core.py
west
west() -> Point
west_north_west
west_north_west() -> Point
Return the west north west anchor of the node
Source code in src/momapy/core.py
west_south_west
west_south_west() -> Point
Return the west south west anchor of the node
Source code in src/momapy/core.py
Phenotype
dataclass
Bases: Activity
Class for phenotypes
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id_
|
str
|
The id of the map element. This id is purely for the user to keep track of the element, it does not need to be unique and is not part of the identity of the element, i.e., it is not considered when testing for equality between two map elements or when hashing the map element |
'9737640e-2042-4221-8b95-8df8e8fc935c'
|
PhenotypeLayout
dataclass
PhenotypeLayout(
fill: NoneValueType | Color | None = white,
stroke: NoneValueType | Color | None = black,
stroke_width: float | None = 1.25,
*,
id_: str = make_uuid4_as_str(),
layout_elements: tuple[LayoutElement] = tuple(),
group_fill: NoneValueType | Color | None = None,
group_fill_rule: FillRule | None = None,
group_filter: NoneValueType | Filter | None = None,
group_font_family: str | None = None,
group_font_size: float | None = None,
group_font_style: FontStyle | None = None,
group_font_weight: FontWeight | float | None = None,
group_stroke: NoneValueType | Color | None = None,
group_stroke_dasharray: tuple[float, ...] | None = None,
group_stroke_dashoffset: float | None = None,
group_stroke_width: float | None = None,
group_text_anchor: TextAnchor | None = None,
group_transform: NoneValueType
| tuple[Transformation]
| None = None,
filter: NoneValueType | Filter | None = None,
height: float = 30.0,
label: TextLayout | None = None,
position: Point,
stroke_dasharray: tuple[float, ...] | None = None,
stroke_dashoffset: float | None = None,
transform: NoneValueType
| tuple[Transformation]
| None = None,
width: float = 60.0,
angle: float = 70.0,
)
Bases: _SimpleMixin, SBGNNode
Class for phenotype layouts
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id_
|
str
|
The id of the map element. This id is purely for the user to keep track of the element, it does not need to be unique and is not part of the identity of the element, i.e., it is not considered when testing for equality between two map elements or when hashing the map element |
'765e8ecd-45b2-4307-a5dc-f393c746949d'
|
layout_elements
|
tuple[LayoutElement]
|
The sub-layout elements of the group layout. These are part of the children of the group layout |
<dynamic>
|
group_fill
|
NoneValueType | Color | None
|
The fill color of the group layout |
None
|
group_fill_rule
|
FillRule | None
|
The fill rule of the group layout |
None
|
group_filter
|
NoneValueType | Filter | None
|
The filter of the group layout |
None
|
group_font_family
|
str | None
|
The font family of the group layout |
None
|
group_font_size
|
float | None
|
The font size of the group layout |
None
|
group_font_style
|
FontStyle | None
|
The font style of the group layout |
None
|
group_font_weight
|
FontWeight | float | None
|
The font weight of the group layout |
None
|
group_stroke
|
NoneValueType | Color | None
|
The stroke color of the group layout |
None
|
group_stroke_dasharray
|
tuple[float, ...] | None
|
The stroke dasharray of the group layout |
None
|
group_stroke_dashoffset
|
float | None
|
The stroke dashoffset of the group layout |
None
|
group_stroke_width
|
float | None
|
The stroke width of the group layout |
None
|
group_text_anchor
|
TextAnchor | None
|
The text anchor of the group layout |
None
|
group_transform
|
NoneValueType | tuple[Transformation] | None
|
The transform of the group layout |
None
|
fill
|
NoneValueType | Color | None
|
|
Color(red=255, green=255, blue=255, alpha=1.0)
|
filter
|
NoneValueType | Filter | None
|
The filter of the node |
None
|
height
|
float
|
|
30.0
|
label
|
TextLayout | None
|
The label of the node |
None
|
position
|
Point
|
The position of the node |
required |
stroke
|
NoneValueType | Color | None
|
|
Color(red=0, green=0, blue=0, alpha=1.0)
|
stroke_dasharray
|
tuple[float, ...] | None
|
The stroke dasharray of the node |
None
|
stroke_dashoffset
|
float | None
|
The stroke dashoffset of the node |
None
|
stroke_width
|
float | None
|
|
1.25
|
transform
|
NoneValueType | tuple[Transformation] | None
|
The transform of the node |
None
|
width
|
float
|
|
60.0
|
angle
|
float
|
|
70.0
|
Methods:
| Name | Description |
|---|---|
anchor_point |
Return an anchor point of the layout element |
bbox |
Compute and return the bounding box of the group layout element |
border |
Return the point on the border of the node that intersects the drawing elements of the node with the line formed of the center anchor point of the node and the given point. |
center |
Return the center anchor of the node |
childless |
Return a copy of the node with no children |
children |
Return the children of the group layout. |
contains |
Return |
descendants |
Return the descendants of the layout element |
drawing_elements |
Return the drawing elements of the group layout. |
east |
Return the east anchor of the node |
east_north_east |
Return the east north east anchor of the node |
east_south_east |
Return the east south east west anchor of the node |
equals |
Return |
flattened |
Return a list containing copy of the layout element with no children and all its descendants with no children |
label_center |
Return the label center anchor of the node |
north |
Return the north anchor of the node |
north_east |
Return the north east anchor of the node |
north_north_east |
Return the north north east anchor of the node |
north_north_west |
Return the north north west anchor of the node |
north_west |
Return the north west anchor of the node |
self_angle |
Return the point on the border of the node that intersects the self drawing elements of the node with the line passing through the center anchor point of the node and at a given angle from the horizontal. |
self_bbox |
Compute and return the bounding box of the self drawing element of the group layout |
self_border |
Return the point on the border of the node that intersects the self drawing elements of the node with the line formed of the center anchor point of the node and the given point. |
self_children |
Return the self children of the node. A node has unique child that is its label |
self_drawing_elements |
Return the node's own drawing elements |
self_to_shapely |
Compute and return a shapely collection of geometries reproducing the self drawing elements of the group layout |
size |
Return the size of the node |
south |
Return the south anchor of the node |
south_east |
Return the south east anchor of the node |
south_south_east |
Return the south south east anchor of the node |
south_south_west |
Return the south south west anchor of the node |
south_west |
Return the south west anchor of the node |
to_shapely |
Return a shapely collection of geometries reproducing the drawing elements of the layout element |
west |
Return the west anchor of the node |
west_north_west |
Return the west north west anchor of the node |
west_south_west |
Return the west south west anchor of the node |
Attributes:
| Name | Type | Description |
|---|---|---|
angle |
float
|
Return the point on the border of the node that intersects the drawing elements of the node with the line passing through the center anchor point of the node and at a given angle from the horizontal. |
x |
float
|
Return the x coordinate of the node |
y |
float
|
Return the y coordinate of the node |
anchor_point
anchor_point(anchor_name: str) -> Point
angle
class-attribute
instance-attribute
Return the point on the border of the node that intersects the drawing elements of the node with the line passing through the center anchor point of the node and at a given angle from the horizontal.
bbox
bbox() -> Bbox
Compute and return the bounding box of the group layout element
Source code in src/momapy/core.py
border
Return the point on the border of the node that intersects the drawing elements of the node with the line formed of the center anchor point of the node and the given point. When there are multiple intersection points, the one closest to the given point is returned
Source code in src/momapy/core.py
center
center() -> Point
childless
children
children() -> list[LayoutElement]
Return the children of the group layout.
These are the self children of the group layout (returned by the self_children method) and the other children of the group layout (given by the layout_elements attribute)
Source code in src/momapy/core.py
contains
contains(other: LayoutElement) -> bool
Return true if another layout element is a descendant of the layout element, false otherwise
drawing_elements
drawing_elements() -> list[DrawingElement]
Return the drawing elements of the group layout. The returned drawing elements are a group drawing element formed of the self drawing elements of the group layout and the drawing elements of its children
Source code in src/momapy/core.py
east
east() -> Point
east_north_east
east_north_east() -> Point
Return the east north east anchor of the node
Source code in src/momapy/core.py
east_south_east
east_south_east() -> Point
Return the east south east west anchor of the node
Source code in src/momapy/core.py
equals
equals(
other: LayoutElement,
flattened: bool = False,
unordered: bool = False,
) -> bool
Return true if the layout element is equal to another layout element, false otherwise
Source code in src/momapy/core.py
flattened
flattened() -> list[LayoutElement]
Return a list containing copy of the layout element with no children and all its descendants with no children
Source code in src/momapy/core.py
label_center
label_center() -> Point
north
north() -> Point
north_east
north_east() -> Point
Return the north east anchor of the node
Source code in src/momapy/core.py
north_north_east
north_north_east() -> Point
Return the north north east anchor of the node
Source code in src/momapy/core.py
north_north_west
north_north_west() -> Point
Return the north north west anchor of the node
Source code in src/momapy/core.py
north_west
north_west() -> Point
Return the north west anchor of the node
Source code in src/momapy/core.py
self_angle
self_angle(
angle: float,
unit: Literal["degrees", "radians"] = "degrees",
) -> Point
Return the point on the border of the node that intersects the self drawing elements of the node with the line passing through the center anchor point of the node and at a given angle from the horizontal.
Source code in src/momapy/core.py
self_bbox
self_bbox() -> Bbox
Compute and return the bounding box of the self drawing element of the group layout
self_border
Return the point on the border of the node that intersects the self drawing elements of the node with the line formed of the center anchor point of the node and the given point. When there are multiple intersection points, the one closest to the given point is returned
Source code in src/momapy/core.py
self_children
self_children() -> list[LayoutElement]
Return the self children of the node. A node has unique child that is its label
self_drawing_elements
self_drawing_elements() -> list[DrawingElement]
Return the node's own drawing elements
Source code in src/momapy/core.py
self_to_shapely
Compute and return a shapely collection of geometries reproducing the self drawing elements of the group layout
size
south
south() -> Point
south_east
south_east() -> Point
Return the south east anchor of the node
Source code in src/momapy/core.py
south_south_east
south_south_east() -> Point
Return the south south east anchor of the node
Source code in src/momapy/core.py
south_south_west
south_south_west() -> Point
Return the south south west anchor of the node
Source code in src/momapy/core.py
south_west
south_west() -> Point
Return the south west anchor of the node
Source code in src/momapy/core.py
to_shapely
Return a shapely collection of geometries reproducing the drawing elements of the layout element
Source code in src/momapy/core.py
west
west() -> Point
west_north_west
west_north_west() -> Point
Return the west north west anchor of the node
Source code in src/momapy/core.py
west_south_west
west_south_west() -> Point
Return the west south west anchor of the node
Source code in src/momapy/core.py
PositiveInfluence
dataclass
PositiveInfluence(
*,
id_: str = make_uuid4_as_str(),
source: BiologicalActivity | LogicalOperator,
target: Activity,
)
Bases: Influence
Class for positive influences
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id_
|
str
|
The id of the map element. This id is purely for the user to keep track of the element, it does not need to be unique and is not part of the identity of the element, i.e., it is not considered when testing for equality between two map elements or when hashing the map element |
'eeb409b4-36aa-4fea-9e9c-f4183b2877a9'
|
source
|
BiologicalActivity | LogicalOperator
|
|
required |
target
|
Activity
|
|
required |
PositiveInfluenceLayout
dataclass
PositiveInfluenceLayout(
path_fill: NoneValueType | Color | None = NoneValue,
path_stroke: NoneValueType | Color | None = black,
path_stroke_width: float | None = 1.25,
arrowhead_fill: NoneValueType | Color | None = white,
arrowhead_stroke: NoneValueType | Color | None = black,
arrowhead_stroke_width: float | None = 1.25,
*,
id_: str = make_uuid4_as_str(),
layout_elements: tuple[LayoutElement] = tuple(),
group_fill: NoneValueType | Color | None = None,
group_fill_rule: FillRule | None = None,
group_filter: NoneValueType | Filter | None = None,
group_font_family: str | None = None,
group_font_size: float | None = None,
group_font_style: FontStyle | None = None,
group_font_weight: FontWeight | float | None = None,
group_stroke: NoneValueType | Color | None = None,
group_stroke_dasharray: tuple[float, ...] | None = None,
group_stroke_dashoffset: float | None = None,
group_stroke_width: float | None = None,
group_text_anchor: TextAnchor | None = None,
group_transform: NoneValueType
| tuple[Transformation]
| None = None,
end_shorten: float = 0.0,
fill: NoneValueType | Color | None = None,
filter: NoneValueType | Filter | None = None,
path_filter: NoneValueType | Filter | None = None,
path_stroke_dasharray: tuple[float, ...] | None = None,
path_stroke_dashoffset: float | None = None,
path_transform: NoneValueType
| tuple[Transformation]
| None = None,
stroke: NoneValueType | Color | None = None,
stroke_dasharray: NoneValueType
| tuple[float]
| None = None,
stroke_dashoffset: float | None = None,
stroke_width: float | None = None,
segments: tuple[
Segment | BezierCurve | EllipticalArc
] = tuple(),
source: LayoutElement | None = None,
start_shorten: float = 0.0,
target: LayoutElement | None = None,
transform: NoneValueType
| tuple[Transformation]
| None = None,
arrowhead_filter: NoneValueType | Filter | None = None,
arrowhead_stroke_dasharray: tuple[float, ...]
| None = None,
arrowhead_stroke_dashoffset: float | None = None,
arrowhead_transform: NoneValueType
| tuple[Transformation]
| None = None,
arrowhead_height: float = 10.0,
arrowhead_width: float = 10.0,
)
Bases: SBGNSingleHeadedArc
Class for positive influence layouts
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id_
|
str
|
The id of the map element. This id is purely for the user to keep track of the element, it does not need to be unique and is not part of the identity of the element, i.e., it is not considered when testing for equality between two map elements or when hashing the map element |
'f25987dc-47a0-4e96-8736-341f47dc4271'
|
layout_elements
|
tuple[LayoutElement]
|
The sub-layout elements of the group layout. These are part of the children of the group layout |
<dynamic>
|
group_fill
|
NoneValueType | Color | None
|
The fill color of the group layout |
None
|
group_fill_rule
|
FillRule | None
|
The fill rule of the group layout |
None
|
group_filter
|
NoneValueType | Filter | None
|
The filter of the group layout |
None
|
group_font_family
|
str | None
|
The font family of the group layout |
None
|
group_font_size
|
float | None
|
The font size of the group layout |
None
|
group_font_style
|
FontStyle | None
|
The font style of the group layout |
None
|
group_font_weight
|
FontWeight | float | None
|
The font weight of the group layout |
None
|
group_stroke
|
NoneValueType | Color | None
|
The stroke color of the group layout |
None
|
group_stroke_dasharray
|
tuple[float, ...] | None
|
The stroke dasharray of the group layout |
None
|
group_stroke_dashoffset
|
float | None
|
The stroke dashoffset of the group layout |
None
|
group_stroke_width
|
float | None
|
The stroke width of the group layout |
None
|
group_text_anchor
|
TextAnchor | None
|
The text anchor of the group layout |
None
|
group_transform
|
NoneValueType | tuple[Transformation] | None
|
The transform of the group layout |
None
|
end_shorten
|
float
|
The length the end of the arc will be shorten by |
0.0
|
fill
|
NoneValueType | Color | None
|
The fill color of the arc |
None
|
filter
|
NoneValueType | Filter | None
|
The fill filter of the arc |
None
|
path_fill
|
NoneValueType | Color | None
|
|
<momapy.drawing.NoneValueType object at 0x7fb32ae9f1d0>
|
path_filter
|
NoneValueType | Filter | None
|
The path filter of the arc |
None
|
path_stroke
|
NoneValueType | Color | None
|
|
Color(red=0, green=0, blue=0, alpha=1.0)
|
path_stroke_dasharray
|
tuple[float, ...] | None
|
The path stroke dasharray of the arc |
None
|
path_stroke_dashoffset
|
float | None
|
The path stroke dashoffset of the arc |
None
|
path_stroke_width
|
float | None
|
|
1.25
|
path_transform
|
NoneValueType | tuple[Transformation] | None
|
The path transform of the arc |
None
|
stroke
|
NoneValueType | Color | None
|
The stroke color of the arc |
None
|
stroke_dasharray
|
NoneValueType | tuple[float] | None
|
The stroke dasharray of the arc |
None
|
stroke_dashoffset
|
float | None
|
The stroke dashoffset of the arc |
None
|
stroke_width
|
float | None
|
The stroke width of the arc |
None
|
segments
|
tuple[Union[Segment, BezierCurve, EllipticalArc]]
|
The path segments of the arc |
<dynamic>
|
source
|
LayoutElement | None
|
The source of the arc |
None
|
start_shorten
|
float
|
The length the start of the arc will be shorten by |
0.0
|
target
|
LayoutElement | None
|
The target of the arc |
None
|
transform
|
NoneValueType | tuple[Transformation] | None
|
The transform of the arc |
None
|
arrowhead_fill
|
NoneValueType | Color | None
|
|
Color(red=255, green=255, blue=255, alpha=1.0)
|
arrowhead_filter
|
NoneValueType | Filter | None
|
The arrowhead filter of the arc |
None
|
arrowhead_stroke
|
NoneValueType | Color | None
|
|
Color(red=0, green=0, blue=0, alpha=1.0)
|
arrowhead_stroke_dasharray
|
tuple[float, ...] | None
|
The arrowhead stroke dasharray of the arc |
None
|
arrowhead_stroke_dashoffset
|
float | None
|
The arrowhead stroke dashoffset of the arc |
None
|
arrowhead_stroke_width
|
float | None
|
|
1.25
|
arrowhead_transform
|
NoneValueType | tuple[Transformation] | None
|
The arrowhead transform of the arc |
None
|
arrowhead_height
|
float
|
|
10.0
|
arrowhead_width
|
float
|
|
10.0
|
Methods:
| Name | Description |
|---|---|
anchor_point |
Return an anchor point of the layout element |
arrowhead_base |
Return the arrowhead base anchor point of the single-headed arc |
arrowhead_bbox |
Return the bounding box of the single-headed arc arrowhead |
arrowhead_border |
Return the point at the intersection of the drawing elements of the single-headed arc arrowhead and the line going through the center of these drawing elements and the given point. |
arrowhead_drawing_elements |
Return the drawing elements of the single-headed arc arrowhead |
arrowhead_length |
Return the length of the single-headed arc arrowhead |
arrowhead_tip |
Return the arrowhead tip anchor point of the single-headed arc |
bbox |
Compute and return the bounding box of the group layout element |
childless |
Return a copy of the arc with no children |
children |
Return the children of the group layout. |
contains |
Return |
descendants |
Return the descendants of the layout element |
drawing_elements |
Return the drawing elements of the group layout. |
end_point |
Return the ending point of the arc |
equals |
Return |
flattened |
Return a list containing copy of the layout element with no children and all its descendants with no children |
fraction |
Return the position and angle on the arc at a given fraction (of the total arc length) |
length |
Return the total length of the arc path |
path_drawing_elements |
Return the drawing elements of the single-headed arc path |
points |
Return the points of the arc path |
self_bbox |
Compute and return the bounding box of the self drawing element of the group layout |
self_children |
Return the self children of the arc |
self_drawing_elements |
Return the self drawing elements of the single-headed arc |
self_to_shapely |
Compute and return a shapely collection of geometries reproducing the self drawing elements of the group layout |
start_point |
Return the starting point of the arc |
to_shapely |
Return a shapely collection of geometries reproducing the drawing elements of the layout element |
anchor_point
anchor_point(anchor_name: str) -> Point
arrowhead_base
arrowhead_base() -> Point
Return the arrowhead base anchor point of the single-headed arc
Source code in src/momapy/core.py
arrowhead_border
arrowhead_border(point) -> Point
Return the point at the intersection of the drawing elements of the single-headed arc arrowhead and the line going through the center of these drawing elements and the given point. When there are multiple intersection points, the one closest to the given point is returned
Source code in src/momapy/core.py
arrowhead_drawing_elements
arrowhead_drawing_elements() -> list[DrawingElement]
Return the drawing elements of the single-headed arc arrowhead
Source code in src/momapy/core.py
arrowhead_length
Return the length of the single-headed arc arrowhead
Source code in src/momapy/core.py
arrowhead_tip
arrowhead_tip() -> Point
Return the arrowhead tip anchor point of the single-headed arc
Source code in src/momapy/core.py
bbox
bbox() -> Bbox
Compute and return the bounding box of the group layout element
Source code in src/momapy/core.py
childless
children
children() -> list[LayoutElement]
Return the children of the group layout.
These are the self children of the group layout (returned by the self_children method) and the other children of the group layout (given by the layout_elements attribute)
Source code in src/momapy/core.py
contains
contains(other: LayoutElement) -> bool
Return true if another layout element is a descendant of the layout element, false otherwise
drawing_elements
drawing_elements() -> list[DrawingElement]
Return the drawing elements of the group layout. The returned drawing elements are a group drawing element formed of the self drawing elements of the group layout and the drawing elements of its children
Source code in src/momapy/core.py
end_point
end_point() -> Point
equals
equals(
other: LayoutElement,
flattened: bool = False,
unordered: bool = False,
) -> bool
Return true if the layout element is equal to another layout element, false otherwise
Source code in src/momapy/core.py
flattened
flattened() -> list[LayoutElement]
Return a list containing copy of the layout element with no children and all its descendants with no children
Source code in src/momapy/core.py
fraction
fraction(fraction: float) -> tuple[Point, float]
Return the position and angle on the arc at a given fraction (of the total arc length)
Source code in src/momapy/core.py
length
path_drawing_elements
path_drawing_elements() -> list[Path]
Return the drawing elements of the single-headed arc path
Source code in src/momapy/core.py
points
points() -> list[Point]
self_bbox
self_bbox() -> Bbox
Compute and return the bounding box of the self drawing element of the group layout
self_children
self_children() -> list[LayoutElement]
self_drawing_elements
self_drawing_elements() -> list[DrawingElement]
Return the self drawing elements of the single-headed arc
Source code in src/momapy/core.py
self_to_shapely
Compute and return a shapely collection of geometries reproducing the self drawing elements of the group layout
start_point
start_point() -> Point
to_shapely
Return a shapely collection of geometries reproducing the drawing elements of the layout element
Source code in src/momapy/core.py
SBGNAFLayout
dataclass
SBGNAFLayout(
*,
id_: str = make_uuid4_as_str(),
layout_elements: tuple[LayoutElement] = tuple(),
group_fill: NoneValueType | Color | None = None,
group_fill_rule: FillRule | None = None,
group_filter: NoneValueType | Filter | None = None,
group_font_family: str | None = None,
group_font_size: float | None = None,
group_font_style: FontStyle | None = None,
group_font_weight: FontWeight | float | None = None,
group_stroke: NoneValueType | Color | None = None,
group_stroke_dasharray: tuple[float, ...] | None = None,
group_stroke_dashoffset: float | None = None,
group_stroke_width: float | None = None,
group_text_anchor: TextAnchor | None = None,
group_transform: NoneValueType
| tuple[Transformation]
| None = None,
fill: NoneValueType | Color | None = white,
filter: NoneValueType | Filter | None = None,
height: float,
label: TextLayout | None = None,
position: Point,
stroke: NoneValueType | Color | None = None,
stroke_dasharray: tuple[float, ...] | None = None,
stroke_dashoffset: float | None = None,
stroke_width: float | None = None,
transform: NoneValueType
| tuple[Transformation]
| None = None,
width: float,
)
Bases: SBGNLayout
Class for SBGN-AF layouts
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id_
|
str
|
The id of the map element. This id is purely for the user to keep track of the element, it does not need to be unique and is not part of the identity of the element, i.e., it is not considered when testing for equality between two map elements or when hashing the map element |
'f8e1c906-9fa8-4c4a-a03b-d83ef39d2aa2'
|
layout_elements
|
tuple[LayoutElement]
|
The sub-layout elements of the group layout. These are part of the children of the group layout |
<dynamic>
|
group_fill
|
NoneValueType | Color | None
|
The fill color of the group layout |
None
|
group_fill_rule
|
FillRule | None
|
The fill rule of the group layout |
None
|
group_filter
|
NoneValueType | Filter | None
|
The filter of the group layout |
None
|
group_font_family
|
str | None
|
The font family of the group layout |
None
|
group_font_size
|
float | None
|
The font size of the group layout |
None
|
group_font_style
|
FontStyle | None
|
The font style of the group layout |
None
|
group_font_weight
|
FontWeight | float | None
|
The font weight of the group layout |
None
|
group_stroke
|
NoneValueType | Color | None
|
The stroke color of the group layout |
None
|
group_stroke_dasharray
|
tuple[float, ...] | None
|
The stroke dasharray of the group layout |
None
|
group_stroke_dashoffset
|
float | None
|
The stroke dashoffset of the group layout |
None
|
group_stroke_width
|
float | None
|
The stroke width of the group layout |
None
|
group_text_anchor
|
TextAnchor | None
|
The text anchor of the group layout |
None
|
group_transform
|
NoneValueType | tuple[Transformation] | None
|
The transform of the group layout |
None
|
fill
|
NoneValueType | Color | None
|
|
Color(red=255, green=255, blue=255, alpha=1.0)
|
filter
|
NoneValueType | Filter | None
|
The filter of the node |
None
|
height
|
float
|
The height of the node |
required |
label
|
TextLayout | None
|
The label of the node |
None
|
position
|
Point
|
The position of the node |
required |
stroke
|
NoneValueType | Color | None
|
The stroke color of the node |
None
|
stroke_dasharray
|
tuple[float, ...] | None
|
The stroke dasharray of the node |
None
|
stroke_dashoffset
|
float | None
|
The stroke dashoffset of the node |
None
|
stroke_width
|
float | None
|
The stroke width of the node |
None
|
transform
|
NoneValueType | tuple[Transformation] | None
|
The transform of the node |
None
|
width
|
float
|
The width width of the node |
required |
Methods:
| Name | Description |
|---|---|
anchor_point |
Return an anchor point of the layout element |
angle |
Return the point on the border of the node that intersects the drawing elements of the node with the line passing through the center anchor point of the node and at a given angle from the horizontal. |
bbox |
Compute and return the bounding box of the group layout element |
border |
Return the point on the border of the node that intersects the drawing elements of the node with the line formed of the center anchor point of the node and the given point. |
center |
Return the center anchor of the node |
childless |
Return a copy of the node with no children |
children |
Return the children of the group layout. |
contains |
Return |
descendants |
Return the descendants of the layout element |
drawing_elements |
Return the drawing elements of the group layout. |
east |
Return the east anchor of the node |
east_north_east |
Return the east north east anchor of the node |
east_south_east |
Return the east south east west anchor of the node |
equals |
Return |
flattened |
Return a list containing copy of the layout element with no children and all its descendants with no children |
is_sublayout |
Return |
label_center |
Return the label center anchor of the node |
north |
Return the north anchor of the node |
north_east |
Return the north east anchor of the node |
north_north_east |
Return the north north east anchor of the node |
north_north_west |
Return the north north west anchor of the node |
north_west |
Return the north west anchor of the node |
self_angle |
Return the point on the border of the node that intersects the self drawing elements of the node with the line passing through the center anchor point of the node and at a given angle from the horizontal. |
self_bbox |
Compute and return the bounding box of the self drawing element of the group layout |
self_border |
Return the point on the border of the node that intersects the self drawing elements of the node with the line formed of the center anchor point of the node and the given point. |
self_children |
Return the self children of the node. A node has unique child that is its label |
self_drawing_elements |
Return the node's own drawing elements |
self_to_shapely |
Compute and return a shapely collection of geometries reproducing the self drawing elements of the group layout |
size |
Return the size of the node |
south |
Return the south anchor of the node |
south_east |
Return the south east anchor of the node |
south_south_east |
Return the south south east anchor of the node |
south_south_west |
Return the south south west anchor of the node |
south_west |
Return the south west anchor of the node |
to_shapely |
Return a shapely collection of geometries reproducing the drawing elements of the layout element |
west |
Return the west anchor of the node |
west_north_west |
Return the west north west anchor of the node |
west_south_west |
Return the west south west anchor of the node |
Attributes:
| Name | Type | Description |
|---|---|---|
x |
float
|
Return the x coordinate of the node |
y |
float
|
Return the y coordinate of the node |
anchor_point
anchor_point(anchor_name: str) -> Point
angle
angle(
angle: float,
unit: Literal["degrees", "radians"] = "degrees",
) -> Point
Return the point on the border of the node that intersects the drawing elements of the node with the line passing through the center anchor point of the node and at a given angle from the horizontal.
Source code in src/momapy/core.py
bbox
bbox() -> Bbox
Compute and return the bounding box of the group layout element
Source code in src/momapy/core.py
border
Return the point on the border of the node that intersects the drawing elements of the node with the line formed of the center anchor point of the node and the given point. When there are multiple intersection points, the one closest to the given point is returned
Source code in src/momapy/core.py
center
center() -> Point
childless
children
children() -> list[LayoutElement]
Return the children of the group layout.
These are the self children of the group layout (returned by the self_children method) and the other children of the group layout (given by the layout_elements attribute)
Source code in src/momapy/core.py
contains
contains(other: LayoutElement) -> bool
Return true if another layout element is a descendant of the layout element, false otherwise
drawing_elements
drawing_elements() -> list[DrawingElement]
Return the drawing elements of the group layout. The returned drawing elements are a group drawing element formed of the self drawing elements of the group layout and the drawing elements of its children
Source code in src/momapy/core.py
east
east() -> Point
east_north_east
east_north_east() -> Point
Return the east north east anchor of the node
Source code in src/momapy/core.py
east_south_east
east_south_east() -> Point
Return the east south east west anchor of the node
Source code in src/momapy/core.py
equals
equals(
other: LayoutElement,
flattened: bool = False,
unordered: bool = False,
) -> bool
Return true if the layout element is equal to another layout element, false otherwise
Source code in src/momapy/core.py
flattened
flattened() -> list[LayoutElement]
Return a list containing copy of the layout element with no children and all its descendants with no children
Source code in src/momapy/core.py
is_sublayout
Return true if another given layout is a sublayout of the layout, false otherwise
Source code in src/momapy/core.py
label_center
label_center() -> Point
north
north() -> Point
north_east
north_east() -> Point
Return the north east anchor of the node
Source code in src/momapy/core.py
north_north_east
north_north_east() -> Point
Return the north north east anchor of the node
Source code in src/momapy/core.py
north_north_west
north_north_west() -> Point
Return the north north west anchor of the node
Source code in src/momapy/core.py
north_west
north_west() -> Point
Return the north west anchor of the node
Source code in src/momapy/core.py
self_angle
self_angle(
angle: float,
unit: Literal["degrees", "radians"] = "degrees",
) -> Point
Return the point on the border of the node that intersects the self drawing elements of the node with the line passing through the center anchor point of the node and at a given angle from the horizontal.
Source code in src/momapy/core.py
self_bbox
self_bbox() -> Bbox
Compute and return the bounding box of the self drawing element of the group layout
self_border
Return the point on the border of the node that intersects the self drawing elements of the node with the line formed of the center anchor point of the node and the given point. When there are multiple intersection points, the one closest to the given point is returned
Source code in src/momapy/core.py
self_children
self_children() -> list[LayoutElement]
Return the self children of the node. A node has unique child that is its label
self_drawing_elements
self_drawing_elements() -> list[DrawingElement]
Return the node's own drawing elements
Source code in src/momapy/core.py
self_to_shapely
Compute and return a shapely collection of geometries reproducing the self drawing elements of the group layout
size
south
south() -> Point
south_east
south_east() -> Point
Return the south east anchor of the node
Source code in src/momapy/core.py
south_south_east
south_south_east() -> Point
Return the south south east anchor of the node
Source code in src/momapy/core.py
south_south_west
south_south_west() -> Point
Return the south south west anchor of the node
Source code in src/momapy/core.py
south_west
south_west() -> Point
Return the south west anchor of the node
Source code in src/momapy/core.py
to_shapely
Return a shapely collection of geometries reproducing the drawing elements of the layout element
Source code in src/momapy/core.py
west
west() -> Point
west_north_west
west_north_west() -> Point
Return the west north west anchor of the node
Source code in src/momapy/core.py
west_south_west
west_south_west() -> Point
Return the west south west anchor of the node
Source code in src/momapy/core.py
SBGNAFLayoutBuilder
module-attribute
SBGNAFLayoutBuilder = get_or_make_builder_cls(SBGNAFLayout)
Class for SBGN-AF layout builders
SBGNAFMap
dataclass
SBGNAFMap(
*,
id_: str = make_uuid4_as_str(),
model: Optional[SBGNAFModel] = None,
layout: Optional[SBGNAFLayout] = None,
layout_model_mapping: LayoutModelMapping | None = None,
)
Bases: SBGNMap
Class for SBGN-AF maps
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id_
|
str
|
The id of the map element. This id is purely for the user to keep track of the element, it does not need to be unique and is not part of the identity of the element, i.e., it is not considered when testing for equality between two map elements or when hashing the map element |
'0396aa6e-ad32-45d0-842b-d2500db17817'
|
model
|
SBGNAFModel | None
|
|
None
|
layout
|
SBGNAFLayout | None
|
|
None
|
layout_model_mapping
|
LayoutModelMapping | None
|
The layout model mapping of the map |
None
|
Methods:
| Name | Description |
|---|---|
get_mapping |
Return the layout elements mapped to the given model element |
is_submap |
Return |
get_mapping
get_mapping(
map_element: MapElement
| tuple[ModelElement, ModelElement],
)
Return the layout elements mapped to the given model element
is_submap
Return true if another given map is a submap of the Map, false otherwise
Source code in src/momapy/core.py
SBGNAFMapBuilder
module-attribute
SBGNAFMapBuilder = get_or_make_builder_cls(
SBGNAFMap,
builder_namespace={
"new_model": _sbgnaf_map_builder_new_model,
"new_layout": _sbgnaf_map_builder_new_layout,
},
)
Class for SBGN-AF map builders
SBGNAFModel
dataclass
SBGNAFModel(
*,
id_: str = make_uuid4_as_str(),
activities: frozenset[Activity] = frozenset(),
compartments: frozenset[Compartment] = frozenset(),
influences: frozenset[Influence] = frozenset(),
logical_operators: frozenset[
LogicalOperator
] = frozenset(),
submaps: frozenset[Submap] = frozenset(),
tags: frozenset[Tag] = frozenset(),
)
Bases: SBGNModel
Class for SBGN-AF models
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id_
|
str
|
The id of the map element. This id is purely for the user to keep track of the element, it does not need to be unique and is not part of the identity of the element, i.e., it is not considered when testing for equality between two map elements or when hashing the map element |
'15ca01a6-e8f8-4fc9-b33a-02cbcef62c55'
|
activities
|
frozenset[Activity]
|
frozenset() -> empty frozenset object frozenset(iterable) -> frozenset object Build an immutable unordered collection of unique elements. |
<class 'frozenset'>
|
compartments
|
frozenset[Compartment]
|
frozenset() -> empty frozenset object frozenset(iterable) -> frozenset object Build an immutable unordered collection of unique elements. |
<class 'frozenset'>
|
influences
|
frozenset[Influence]
|
frozenset() -> empty frozenset object frozenset(iterable) -> frozenset object Build an immutable unordered collection of unique elements. |
<class 'frozenset'>
|
logical_operators
|
frozenset[LogicalOperator]
|
frozenset() -> empty frozenset object frozenset(iterable) -> frozenset object Build an immutable unordered collection of unique elements. |
<class 'frozenset'>
|
submaps
|
frozenset[Submap]
|
frozenset() -> empty frozenset object frozenset(iterable) -> frozenset object Build an immutable unordered collection of unique elements. |
<class 'frozenset'>
|
tags
|
frozenset[Tag]
|
frozenset() -> empty frozenset object frozenset(iterable) -> frozenset object Build an immutable unordered collection of unique elements. |
<class 'frozenset'>
|
Methods:
| Name | Description |
|---|---|
is_submodel |
Return |
is_submodel
is_submodel(other: SBGNAFModel) -> bool
Return true if the another given SBGN-AF model is a submodel of the SBGN-AF model, false otherwise
Source code in src/momapy/sbgn/af.py
SBGNAFModelBuilder
module-attribute
SBGNAFModelBuilder = get_or_make_builder_cls(SBGNAFModel)
Class for SBGN-AF model builders
SimpleChemicalUnitOfInformation
dataclass
Bases: UnitOfInformation
Class for simple chemical units of information
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id_
|
str
|
The id of the map element. This id is purely for the user to keep track of the element, it does not need to be unique and is not part of the identity of the element, i.e., it is not considered when testing for equality between two map elements or when hashing the map element |
'67cd6bf4-11cf-4068-a737-b188f641f95a'
|
label
|
str | None
|
|
None
|
SimpleChemicalUnitOfInformationLayout
dataclass
SimpleChemicalUnitOfInformationLayout(
fill: NoneValueType | Color | None = white,
stroke: NoneValueType | Color | None = black,
stroke_width: float | None = 1.25,
*,
id_: str = make_uuid4_as_str(),
layout_elements: tuple[LayoutElement] = tuple(),
group_fill: NoneValueType | Color | None = None,
group_fill_rule: FillRule | None = None,
group_filter: NoneValueType | Filter | None = None,
group_font_family: str | None = None,
group_font_size: float | None = None,
group_font_style: FontStyle | None = None,
group_font_weight: FontWeight | float | None = None,
group_stroke: NoneValueType | Color | None = None,
group_stroke_dasharray: tuple[float, ...] | None = None,
group_stroke_dashoffset: float | None = None,
group_stroke_width: float | None = None,
group_text_anchor: TextAnchor | None = None,
group_transform: NoneValueType
| tuple[Transformation]
| None = None,
filter: NoneValueType | Filter | None = None,
height: float = 12.0,
label: TextLayout | None = None,
position: Point,
stroke_dasharray: tuple[float, ...] | None = None,
stroke_dashoffset: float | None = None,
transform: NoneValueType
| tuple[Transformation]
| None = None,
width: float = 12.0,
)
Bases: _SimpleMixin, SBGNNode
Class for simple chemical unit of information layouts
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id_
|
str
|
The id of the map element. This id is purely for the user to keep track of the element, it does not need to be unique and is not part of the identity of the element, i.e., it is not considered when testing for equality between two map elements or when hashing the map element |
'd973272d-4176-484e-aa0a-5beb7fb38cda'
|
layout_elements
|
tuple[LayoutElement]
|
The sub-layout elements of the group layout. These are part of the children of the group layout |
<dynamic>
|
group_fill
|
NoneValueType | Color | None
|
The fill color of the group layout |
None
|
group_fill_rule
|
FillRule | None
|
The fill rule of the group layout |
None
|
group_filter
|
NoneValueType | Filter | None
|
The filter of the group layout |
None
|
group_font_family
|
str | None
|
The font family of the group layout |
None
|
group_font_size
|
float | None
|
The font size of the group layout |
None
|
group_font_style
|
FontStyle | None
|
The font style of the group layout |
None
|
group_font_weight
|
FontWeight | float | None
|
The font weight of the group layout |
None
|
group_stroke
|
NoneValueType | Color | None
|
The stroke color of the group layout |
None
|
group_stroke_dasharray
|
tuple[float, ...] | None
|
The stroke dasharray of the group layout |
None
|
group_stroke_dashoffset
|
float | None
|
The stroke dashoffset of the group layout |
None
|
group_stroke_width
|
float | None
|
The stroke width of the group layout |
None
|
group_text_anchor
|
TextAnchor | None
|
The text anchor of the group layout |
None
|
group_transform
|
NoneValueType | tuple[Transformation] | None
|
The transform of the group layout |
None
|
fill
|
NoneValueType | Color | None
|
|
Color(red=255, green=255, blue=255, alpha=1.0)
|
filter
|
NoneValueType | Filter | None
|
The filter of the node |
None
|
height
|
float
|
|
12.0
|
label
|
TextLayout | None
|
The label of the node |
None
|
position
|
Point
|
The position of the node |
required |
stroke
|
NoneValueType | Color | None
|
|
Color(red=0, green=0, blue=0, alpha=1.0)
|
stroke_dasharray
|
tuple[float, ...] | None
|
The stroke dasharray of the node |
None
|
stroke_dashoffset
|
float | None
|
The stroke dashoffset of the node |
None
|
stroke_width
|
float | None
|
|
1.25
|
transform
|
NoneValueType | tuple[Transformation] | None
|
The transform of the node |
None
|
width
|
float
|
|
12.0
|
Methods:
| Name | Description |
|---|---|
anchor_point |
Return an anchor point of the layout element |
angle |
Return the point on the border of the node that intersects the drawing elements of the node with the line passing through the center anchor point of the node and at a given angle from the horizontal. |
bbox |
Compute and return the bounding box of the group layout element |
border |
Return the point on the border of the node that intersects the drawing elements of the node with the line formed of the center anchor point of the node and the given point. |
center |
Return the center anchor of the node |
childless |
Return a copy of the node with no children |
children |
Return the children of the group layout. |
contains |
Return |
descendants |
Return the descendants of the layout element |
drawing_elements |
Return the drawing elements of the group layout. |
east |
Return the east anchor of the node |
east_north_east |
Return the east north east anchor of the node |
east_south_east |
Return the east south east west anchor of the node |
equals |
Return |
flattened |
Return a list containing copy of the layout element with no children and all its descendants with no children |
label_center |
Return the label center anchor of the node |
north |
Return the north anchor of the node |
north_east |
Return the north east anchor of the node |
north_north_east |
Return the north north east anchor of the node |
north_north_west |
Return the north north west anchor of the node |
north_west |
Return the north west anchor of the node |
self_angle |
Return the point on the border of the node that intersects the self drawing elements of the node with the line passing through the center anchor point of the node and at a given angle from the horizontal. |
self_bbox |
Compute and return the bounding box of the self drawing element of the group layout |
self_border |
Return the point on the border of the node that intersects the self drawing elements of the node with the line formed of the center anchor point of the node and the given point. |
self_children |
Return the self children of the node. A node has unique child that is its label |
self_drawing_elements |
Return the node's own drawing elements |
self_to_shapely |
Compute and return a shapely collection of geometries reproducing the self drawing elements of the group layout |
size |
Return the size of the node |
south |
Return the south anchor of the node |
south_east |
Return the south east anchor of the node |
south_south_east |
Return the south south east anchor of the node |
south_south_west |
Return the south south west anchor of the node |
south_west |
Return the south west anchor of the node |
to_shapely |
Return a shapely collection of geometries reproducing the drawing elements of the layout element |
west |
Return the west anchor of the node |
west_north_west |
Return the west north west anchor of the node |
west_south_west |
Return the west south west anchor of the node |
Attributes:
| Name | Type | Description |
|---|---|---|
x |
float
|
Return the x coordinate of the node |
y |
float
|
Return the y coordinate of the node |
anchor_point
anchor_point(anchor_name: str) -> Point
angle
angle(
angle: float,
unit: Literal["degrees", "radians"] = "degrees",
) -> Point
Return the point on the border of the node that intersects the drawing elements of the node with the line passing through the center anchor point of the node and at a given angle from the horizontal.
Source code in src/momapy/core.py
bbox
bbox() -> Bbox
Compute and return the bounding box of the group layout element
Source code in src/momapy/core.py
border
Return the point on the border of the node that intersects the drawing elements of the node with the line formed of the center anchor point of the node and the given point. When there are multiple intersection points, the one closest to the given point is returned
Source code in src/momapy/core.py
center
center() -> Point
childless
children
children() -> list[LayoutElement]
Return the children of the group layout.
These are the self children of the group layout (returned by the self_children method) and the other children of the group layout (given by the layout_elements attribute)
Source code in src/momapy/core.py
contains
contains(other: LayoutElement) -> bool
Return true if another layout element is a descendant of the layout element, false otherwise
drawing_elements
drawing_elements() -> list[DrawingElement]
Return the drawing elements of the group layout. The returned drawing elements are a group drawing element formed of the self drawing elements of the group layout and the drawing elements of its children
Source code in src/momapy/core.py
east
east() -> Point
east_north_east
east_north_east() -> Point
Return the east north east anchor of the node
Source code in src/momapy/core.py
east_south_east
east_south_east() -> Point
Return the east south east west anchor of the node
Source code in src/momapy/core.py
equals
equals(
other: LayoutElement,
flattened: bool = False,
unordered: bool = False,
) -> bool
Return true if the layout element is equal to another layout element, false otherwise
Source code in src/momapy/core.py
flattened
flattened() -> list[LayoutElement]
Return a list containing copy of the layout element with no children and all its descendants with no children
Source code in src/momapy/core.py
label_center
label_center() -> Point
north
north() -> Point
north_east
north_east() -> Point
Return the north east anchor of the node
Source code in src/momapy/core.py
north_north_east
north_north_east() -> Point
Return the north north east anchor of the node
Source code in src/momapy/core.py
north_north_west
north_north_west() -> Point
Return the north north west anchor of the node
Source code in src/momapy/core.py
north_west
north_west() -> Point
Return the north west anchor of the node
Source code in src/momapy/core.py
self_angle
self_angle(
angle: float,
unit: Literal["degrees", "radians"] = "degrees",
) -> Point
Return the point on the border of the node that intersects the self drawing elements of the node with the line passing through the center anchor point of the node and at a given angle from the horizontal.
Source code in src/momapy/core.py
self_bbox
self_bbox() -> Bbox
Compute and return the bounding box of the self drawing element of the group layout
self_border
Return the point on the border of the node that intersects the self drawing elements of the node with the line formed of the center anchor point of the node and the given point. When there are multiple intersection points, the one closest to the given point is returned
Source code in src/momapy/core.py
self_children
self_children() -> list[LayoutElement]
Return the self children of the node. A node has unique child that is its label
self_drawing_elements
self_drawing_elements() -> list[DrawingElement]
Return the node's own drawing elements
Source code in src/momapy/core.py
self_to_shapely
Compute and return a shapely collection of geometries reproducing the self drawing elements of the group layout
size
south
south() -> Point
south_east
south_east() -> Point
Return the south east anchor of the node
Source code in src/momapy/core.py
south_south_east
south_south_east() -> Point
Return the south south east anchor of the node
Source code in src/momapy/core.py
south_south_west
south_south_west() -> Point
Return the south south west anchor of the node
Source code in src/momapy/core.py
south_west
south_west() -> Point
Return the south west anchor of the node
Source code in src/momapy/core.py
to_shapely
Return a shapely collection of geometries reproducing the drawing elements of the layout element
Source code in src/momapy/core.py
west
west() -> Point
west_north_west
west_north_west() -> Point
Return the west north west anchor of the node
Source code in src/momapy/core.py
west_south_west
west_south_west() -> Point
Return the west south west anchor of the node
Source code in src/momapy/core.py
Submap
dataclass
Submap(
*,
id_: str = make_uuid4_as_str(),
label: Optional[str] = None,
terminals: frozenset[Terminal] = frozenset(),
)
Bases: SBGNModelElement
Class for submaps
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id_
|
str
|
The id of the map element. This id is purely for the user to keep track of the element, it does not need to be unique and is not part of the identity of the element, i.e., it is not considered when testing for equality between two map elements or when hashing the map element |
'ddfb9b6a-eccc-4bfa-803a-ea76f2b5348b'
|
label
|
str | None
|
|
None
|
terminals
|
frozenset[Terminal]
|
frozenset() -> empty frozenset object frozenset(iterable) -> frozenset object Build an immutable unordered collection of unique elements. |
<class 'frozenset'>
|
SubmapLayout
dataclass
SubmapLayout(
fill: NoneValueType | Color | None = white,
stroke: NoneValueType | Color | None = black,
stroke_width: float | None = 1.25,
*,
id_: str = make_uuid4_as_str(),
layout_elements: tuple[LayoutElement] = tuple(),
group_fill: NoneValueType | Color | None = None,
group_fill_rule: FillRule | None = None,
group_filter: NoneValueType | Filter | None = None,
group_font_family: str | None = None,
group_font_size: float | None = None,
group_font_style: FontStyle | None = None,
group_font_weight: FontWeight | float | None = None,
group_stroke: NoneValueType | Color | None = None,
group_stroke_dasharray: tuple[float, ...] | None = None,
group_stroke_dashoffset: float | None = None,
group_stroke_width: float | None = None,
group_text_anchor: TextAnchor | None = None,
group_transform: NoneValueType
| tuple[Transformation]
| None = None,
filter: NoneValueType | Filter | None = None,
height: float = 80.0,
label: TextLayout | None = None,
position: Point,
stroke_dasharray: tuple[float, ...] | None = None,
stroke_dashoffset: float | None = None,
transform: NoneValueType
| tuple[Transformation]
| None = None,
width: float = 80.0,
border_stroke_width: float | None = 2.25,
)
Bases: _SimpleMixin, SBGNNode
Class for submap layouts
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id_
|
str
|
The id of the map element. This id is purely for the user to keep track of the element, it does not need to be unique and is not part of the identity of the element, i.e., it is not considered when testing for equality between two map elements or when hashing the map element |
'17f56d52-322a-4a77-8da4-a320b6d27e21'
|
layout_elements
|
tuple[LayoutElement]
|
The sub-layout elements of the group layout. These are part of the children of the group layout |
<dynamic>
|
group_fill
|
NoneValueType | Color | None
|
The fill color of the group layout |
None
|
group_fill_rule
|
FillRule | None
|
The fill rule of the group layout |
None
|
group_filter
|
NoneValueType | Filter | None
|
The filter of the group layout |
None
|
group_font_family
|
str | None
|
The font family of the group layout |
None
|
group_font_size
|
float | None
|
The font size of the group layout |
None
|
group_font_style
|
FontStyle | None
|
The font style of the group layout |
None
|
group_font_weight
|
FontWeight | float | None
|
The font weight of the group layout |
None
|
group_stroke
|
NoneValueType | Color | None
|
The stroke color of the group layout |
None
|
group_stroke_dasharray
|
tuple[float, ...] | None
|
The stroke dasharray of the group layout |
None
|
group_stroke_dashoffset
|
float | None
|
The stroke dashoffset of the group layout |
None
|
group_stroke_width
|
float | None
|
The stroke width of the group layout |
None
|
group_text_anchor
|
TextAnchor | None
|
The text anchor of the group layout |
None
|
group_transform
|
NoneValueType | tuple[Transformation] | None
|
The transform of the group layout |
None
|
fill
|
NoneValueType | Color | None
|
|
Color(red=255, green=255, blue=255, alpha=1.0)
|
filter
|
NoneValueType | Filter | None
|
The filter of the node |
None
|
height
|
float
|
|
80.0
|
label
|
TextLayout | None
|
The label of the node |
None
|
position
|
Point
|
The position of the node |
required |
stroke
|
NoneValueType | Color | None
|
|
Color(red=0, green=0, blue=0, alpha=1.0)
|
stroke_dasharray
|
tuple[float, ...] | None
|
The stroke dasharray of the node |
None
|
stroke_dashoffset
|
float | None
|
The stroke dashoffset of the node |
None
|
stroke_width
|
float | None
|
|
1.25
|
transform
|
NoneValueType | tuple[Transformation] | None
|
The transform of the node |
None
|
width
|
float
|
|
80.0
|
border_stroke_width
|
float | None
|
|
2.25
|
Methods:
| Name | Description |
|---|---|
anchor_point |
Return an anchor point of the layout element |
angle |
Return the point on the border of the node that intersects the drawing elements of the node with the line passing through the center anchor point of the node and at a given angle from the horizontal. |
bbox |
Compute and return the bounding box of the group layout element |
border |
Return the point on the border of the node that intersects the drawing elements of the node with the line formed of the center anchor point of the node and the given point. |
center |
Return the center anchor of the node |
childless |
Return a copy of the node with no children |
children |
Return the children of the group layout. |
contains |
Return |
descendants |
Return the descendants of the layout element |
drawing_elements |
Return the drawing elements of the group layout. |
east |
Return the east anchor of the node |
east_north_east |
Return the east north east anchor of the node |
east_south_east |
Return the east south east west anchor of the node |
equals |
Return |
flattened |
Return a list containing copy of the layout element with no children and all its descendants with no children |
label_center |
Return the label center anchor of the node |
north |
Return the north anchor of the node |
north_east |
Return the north east anchor of the node |
north_north_east |
Return the north north east anchor of the node |
north_north_west |
Return the north north west anchor of the node |
north_west |
Return the north west anchor of the node |
self_angle |
Return the point on the border of the node that intersects the self drawing elements of the node with the line passing through the center anchor point of the node and at a given angle from the horizontal. |
self_bbox |
Compute and return the bounding box of the self drawing element of the group layout |
self_border |
Return the point on the border of the node that intersects the self drawing elements of the node with the line formed of the center anchor point of the node and the given point. |
self_children |
Return the self children of the node. A node has unique child that is its label |
self_drawing_elements |
Return the node's own drawing elements |
self_to_shapely |
Compute and return a shapely collection of geometries reproducing the self drawing elements of the group layout |
size |
Return the size of the node |
south |
Return the south anchor of the node |
south_east |
Return the south east anchor of the node |
south_south_east |
Return the south south east anchor of the node |
south_south_west |
Return the south south west anchor of the node |
south_west |
Return the south west anchor of the node |
to_shapely |
Return a shapely collection of geometries reproducing the drawing elements of the layout element |
west |
Return the west anchor of the node |
west_north_west |
Return the west north west anchor of the node |
west_south_west |
Return the west south west anchor of the node |
Attributes:
| Name | Type | Description |
|---|---|---|
x |
float
|
Return the x coordinate of the node |
y |
float
|
Return the y coordinate of the node |
anchor_point
anchor_point(anchor_name: str) -> Point
angle
angle(
angle: float,
unit: Literal["degrees", "radians"] = "degrees",
) -> Point
Return the point on the border of the node that intersects the drawing elements of the node with the line passing through the center anchor point of the node and at a given angle from the horizontal.
Source code in src/momapy/core.py
bbox
bbox() -> Bbox
Compute and return the bounding box of the group layout element
Source code in src/momapy/core.py
border
Return the point on the border of the node that intersects the drawing elements of the node with the line formed of the center anchor point of the node and the given point. When there are multiple intersection points, the one closest to the given point is returned
Source code in src/momapy/core.py
center
center() -> Point
childless
children
children() -> list[LayoutElement]
Return the children of the group layout.
These are the self children of the group layout (returned by the self_children method) and the other children of the group layout (given by the layout_elements attribute)
Source code in src/momapy/core.py
contains
contains(other: LayoutElement) -> bool
Return true if another layout element is a descendant of the layout element, false otherwise
drawing_elements
drawing_elements() -> list[DrawingElement]
Return the drawing elements of the group layout. The returned drawing elements are a group drawing element formed of the self drawing elements of the group layout and the drawing elements of its children
Source code in src/momapy/core.py
east
east() -> Point
east_north_east
east_north_east() -> Point
Return the east north east anchor of the node
Source code in src/momapy/core.py
east_south_east
east_south_east() -> Point
Return the east south east west anchor of the node
Source code in src/momapy/core.py
equals
equals(
other: LayoutElement,
flattened: bool = False,
unordered: bool = False,
) -> bool
Return true if the layout element is equal to another layout element, false otherwise
Source code in src/momapy/core.py
flattened
flattened() -> list[LayoutElement]
Return a list containing copy of the layout element with no children and all its descendants with no children
Source code in src/momapy/core.py
label_center
label_center() -> Point
north
north() -> Point
north_east
north_east() -> Point
Return the north east anchor of the node
Source code in src/momapy/core.py
north_north_east
north_north_east() -> Point
Return the north north east anchor of the node
Source code in src/momapy/core.py
north_north_west
north_north_west() -> Point
Return the north north west anchor of the node
Source code in src/momapy/core.py
north_west
north_west() -> Point
Return the north west anchor of the node
Source code in src/momapy/core.py
self_angle
self_angle(
angle: float,
unit: Literal["degrees", "radians"] = "degrees",
) -> Point
Return the point on the border of the node that intersects the self drawing elements of the node with the line passing through the center anchor point of the node and at a given angle from the horizontal.
Source code in src/momapy/core.py
self_bbox
self_bbox() -> Bbox
Compute and return the bounding box of the self drawing element of the group layout
self_border
Return the point on the border of the node that intersects the self drawing elements of the node with the line formed of the center anchor point of the node and the given point. When there are multiple intersection points, the one closest to the given point is returned
Source code in src/momapy/core.py
self_children
self_children() -> list[LayoutElement]
Return the self children of the node. A node has unique child that is its label
self_drawing_elements
self_drawing_elements() -> list[DrawingElement]
Return the node's own drawing elements
Source code in src/momapy/core.py
self_to_shapely
Compute and return a shapely collection of geometries reproducing the self drawing elements of the group layout
size
south
south() -> Point
south_east
south_east() -> Point
Return the south east anchor of the node
Source code in src/momapy/core.py
south_south_east
south_south_east() -> Point
Return the south south east anchor of the node
Source code in src/momapy/core.py
south_south_west
south_south_west() -> Point
Return the south south west anchor of the node
Source code in src/momapy/core.py
south_west
south_west() -> Point
Return the south west anchor of the node
Source code in src/momapy/core.py
to_shapely
Return a shapely collection of geometries reproducing the drawing elements of the layout element
Source code in src/momapy/core.py
west
west() -> Point
west_north_west
west_north_west() -> Point
Return the west north west anchor of the node
Source code in src/momapy/core.py
west_south_west
west_south_west() -> Point
Return the west south west anchor of the node
Source code in src/momapy/core.py
Tag
dataclass
Tag(
*,
id_: str = make_uuid4_as_str(),
label: Optional[str] = None,
refers_to: Optional[TagReference] = None,
)
Bases: SBGNModelElement
Class for tags
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id_
|
str
|
The id of the map element. This id is purely for the user to keep track of the element, it does not need to be unique and is not part of the identity of the element, i.e., it is not considered when testing for equality between two map elements or when hashing the map element |
'f1b10ca0-c6c4-46bd-8be3-1d856aba5bd4'
|
label
|
str | None
|
|
None
|
refers_to
|
TagReference | None
|
|
None
|
TagLayout
dataclass
TagLayout(
fill: NoneValueType | Color | None = white,
stroke: NoneValueType | Color | None = black,
stroke_width: float | None = 1.25,
*,
id_: str = make_uuid4_as_str(),
layout_elements: tuple[LayoutElement] = tuple(),
group_fill: NoneValueType | Color | None = None,
group_fill_rule: FillRule | None = None,
group_filter: NoneValueType | Filter | None = None,
group_font_family: str | None = None,
group_font_size: float | None = None,
group_font_style: FontStyle | None = None,
group_font_weight: FontWeight | float | None = None,
group_stroke: NoneValueType | Color | None = None,
group_stroke_dasharray: tuple[float, ...] | None = None,
group_stroke_dashoffset: float | None = None,
group_stroke_width: float | None = None,
group_text_anchor: TextAnchor | None = None,
group_transform: NoneValueType
| tuple[Transformation]
| None = None,
filter: NoneValueType | Filter | None = None,
height: float = 35.0,
label: TextLayout | None = None,
position: Point,
stroke_dasharray: tuple[float, ...] | None = None,
stroke_dashoffset: float | None = None,
transform: NoneValueType
| tuple[Transformation]
| None = None,
width: float = 35.0,
direction: Direction = RIGHT,
angle: float = 70.0,
)
Bases: TagLayout
Class for tag layouts
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id_
|
str
|
The id of the map element. This id is purely for the user to keep track of the element, it does not need to be unique and is not part of the identity of the element, i.e., it is not considered when testing for equality between two map elements or when hashing the map element |
'489bc0bd-0fa8-403f-bd4a-1a8251ae0438'
|
layout_elements
|
tuple[LayoutElement]
|
The sub-layout elements of the group layout. These are part of the children of the group layout |
<dynamic>
|
group_fill
|
NoneValueType | Color | None
|
The fill color of the group layout |
None
|
group_fill_rule
|
FillRule | None
|
The fill rule of the group layout |
None
|
group_filter
|
NoneValueType | Filter | None
|
The filter of the group layout |
None
|
group_font_family
|
str | None
|
The font family of the group layout |
None
|
group_font_size
|
float | None
|
The font size of the group layout |
None
|
group_font_style
|
FontStyle | None
|
The font style of the group layout |
None
|
group_font_weight
|
FontWeight | float | None
|
The font weight of the group layout |
None
|
group_stroke
|
NoneValueType | Color | None
|
The stroke color of the group layout |
None
|
group_stroke_dasharray
|
tuple[float, ...] | None
|
The stroke dasharray of the group layout |
None
|
group_stroke_dashoffset
|
float | None
|
The stroke dashoffset of the group layout |
None
|
group_stroke_width
|
float | None
|
The stroke width of the group layout |
None
|
group_text_anchor
|
TextAnchor | None
|
The text anchor of the group layout |
None
|
group_transform
|
NoneValueType | tuple[Transformation] | None
|
The transform of the group layout |
None
|
fill
|
NoneValueType | Color | None
|
|
Color(red=255, green=255, blue=255, alpha=1.0)
|
filter
|
NoneValueType | Filter | None
|
The filter of the node |
None
|
height
|
float
|
|
35.0
|
label
|
TextLayout | None
|
The label of the node |
None
|
position
|
Point
|
The position of the node |
required |
stroke
|
NoneValueType | Color | None
|
|
Color(red=0, green=0, blue=0, alpha=1.0)
|
stroke_dasharray
|
tuple[float, ...] | None
|
The stroke dasharray of the node |
None
|
stroke_dashoffset
|
float | None
|
The stroke dashoffset of the node |
None
|
stroke_width
|
float | None
|
|
1.25
|
transform
|
NoneValueType | tuple[Transformation] | None
|
The transform of the node |
None
|
width
|
float
|
|
35.0
|
direction
|
Direction
|
|
<Direction.RIGHT: 4>
|
angle
|
float
|
|
70.0
|
Methods:
| Name | Description |
|---|---|
anchor_point |
Return an anchor point of the layout element |
bbox |
Compute and return the bounding box of the group layout element |
border |
Return the point on the border of the node that intersects the drawing elements of the node with the line formed of the center anchor point of the node and the given point. |
center |
Return the center anchor of the node |
childless |
Return a copy of the node with no children |
children |
Return the children of the group layout. |
contains |
Return |
descendants |
Return the descendants of the layout element |
drawing_elements |
Return the drawing elements of the group layout. |
east |
Return the east anchor of the node |
east_north_east |
Return the east north east anchor of the node |
east_south_east |
Return the east south east west anchor of the node |
equals |
Return |
flattened |
Return a list containing copy of the layout element with no children and all its descendants with no children |
label_center |
Return the label center anchor of the node |
north |
Return the north anchor of the node |
north_east |
Return the north east anchor of the node |
north_north_east |
Return the north north east anchor of the node |
north_north_west |
Return the north north west anchor of the node |
north_west |
Return the north west anchor of the node |
self_angle |
Return the point on the border of the node that intersects the self drawing elements of the node with the line passing through the center anchor point of the node and at a given angle from the horizontal. |
self_bbox |
Compute and return the bounding box of the self drawing element of the group layout |
self_border |
Return the point on the border of the node that intersects the self drawing elements of the node with the line formed of the center anchor point of the node and the given point. |
self_children |
Return the self children of the node. A node has unique child that is its label |
self_drawing_elements |
Return the node's own drawing elements |
self_to_shapely |
Compute and return a shapely collection of geometries reproducing the self drawing elements of the group layout |
size |
Return the size of the node |
south |
Return the south anchor of the node |
south_east |
Return the south east anchor of the node |
south_south_east |
Return the south south east anchor of the node |
south_south_west |
Return the south south west anchor of the node |
south_west |
Return the south west anchor of the node |
to_shapely |
Return a shapely collection of geometries reproducing the drawing elements of the layout element |
west |
Return the west anchor of the node |
west_north_west |
Return the west north west anchor of the node |
west_south_west |
Return the west south west anchor of the node |
Attributes:
| Name | Type | Description |
|---|---|---|
angle |
float
|
Return the point on the border of the node that intersects the drawing elements of the node with the line passing through the center anchor point of the node and at a given angle from the horizontal. |
x |
float
|
Return the x coordinate of the node |
y |
float
|
Return the y coordinate of the node |
anchor_point
anchor_point(anchor_name: str) -> Point
angle
class-attribute
instance-attribute
Return the point on the border of the node that intersects the drawing elements of the node with the line passing through the center anchor point of the node and at a given angle from the horizontal.
bbox
bbox() -> Bbox
Compute and return the bounding box of the group layout element
Source code in src/momapy/core.py
border
Return the point on the border of the node that intersects the drawing elements of the node with the line formed of the center anchor point of the node and the given point. When there are multiple intersection points, the one closest to the given point is returned
Source code in src/momapy/core.py
center
center() -> Point
childless
children
children() -> list[LayoutElement]
Return the children of the group layout.
These are the self children of the group layout (returned by the self_children method) and the other children of the group layout (given by the layout_elements attribute)
Source code in src/momapy/core.py
contains
contains(other: LayoutElement) -> bool
Return true if another layout element is a descendant of the layout element, false otherwise
drawing_elements
drawing_elements() -> list[DrawingElement]
Return the drawing elements of the group layout. The returned drawing elements are a group drawing element formed of the self drawing elements of the group layout and the drawing elements of its children
Source code in src/momapy/core.py
east
east() -> Point
east_north_east
east_north_east() -> Point
Return the east north east anchor of the node
Source code in src/momapy/core.py
east_south_east
east_south_east() -> Point
Return the east south east west anchor of the node
Source code in src/momapy/core.py
equals
equals(
other: LayoutElement,
flattened: bool = False,
unordered: bool = False,
) -> bool
Return true if the layout element is equal to another layout element, false otherwise
Source code in src/momapy/core.py
flattened
flattened() -> list[LayoutElement]
Return a list containing copy of the layout element with no children and all its descendants with no children
Source code in src/momapy/core.py
label_center
label_center() -> Point
north
north() -> Point
north_east
north_east() -> Point
Return the north east anchor of the node
Source code in src/momapy/core.py
north_north_east
north_north_east() -> Point
Return the north north east anchor of the node
Source code in src/momapy/core.py
north_north_west
north_north_west() -> Point
Return the north north west anchor of the node
Source code in src/momapy/core.py
north_west
north_west() -> Point
Return the north west anchor of the node
Source code in src/momapy/core.py
self_angle
self_angle(
angle: float,
unit: Literal["degrees", "radians"] = "degrees",
) -> Point
Return the point on the border of the node that intersects the self drawing elements of the node with the line passing through the center anchor point of the node and at a given angle from the horizontal.
Source code in src/momapy/core.py
self_bbox
self_bbox() -> Bbox
Compute and return the bounding box of the self drawing element of the group layout
self_border
Return the point on the border of the node that intersects the self drawing elements of the node with the line formed of the center anchor point of the node and the given point. When there are multiple intersection points, the one closest to the given point is returned
Source code in src/momapy/core.py
self_children
self_children() -> list[LayoutElement]
Return the self children of the node. A node has unique child that is its label
self_drawing_elements
self_drawing_elements() -> list[DrawingElement]
Return the node's own drawing elements
Source code in src/momapy/core.py
self_to_shapely
Compute and return a shapely collection of geometries reproducing the self drawing elements of the group layout
size
south
south() -> Point
south_east
south_east() -> Point
Return the south east anchor of the node
Source code in src/momapy/core.py
south_south_east
south_south_east() -> Point
Return the south south east anchor of the node
Source code in src/momapy/core.py
south_south_west
south_south_west() -> Point
Return the south south west anchor of the node
Source code in src/momapy/core.py
south_west
south_west() -> Point
Return the south west anchor of the node
Source code in src/momapy/core.py
to_shapely
Return a shapely collection of geometries reproducing the drawing elements of the layout element
Source code in src/momapy/core.py
west
west() -> Point
west_north_west
west_north_west() -> Point
Return the west north west anchor of the node
Source code in src/momapy/core.py
west_south_west
west_south_west() -> Point
Return the west south west anchor of the node
Source code in src/momapy/core.py
TagReference
dataclass
TagReference(
*,
id_: str = make_uuid4_as_str(),
element: Union[Activity, Compartment],
)
Bases: SBGNRole
Class for references of tags
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id_
|
str
|
The id of the map element. This id is purely for the user to keep track of the element, it does not need to be unique and is not part of the identity of the element, i.e., it is not considered when testing for equality between two map elements or when hashing the map element |
'a72e8861-8073-47bf-bcff-40e45e0efecd'
|
element
|
Activity | Compartment
|
|
required |
Terminal
dataclass
Terminal(
*,
id_: str = make_uuid4_as_str(),
label: Optional[str] = None,
refers_to: Optional[TerminalReference] = None,
)
Bases: SBGNModelElement
Class for terminals
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id_
|
str
|
The id of the map element. This id is purely for the user to keep track of the element, it does not need to be unique and is not part of the identity of the element, i.e., it is not considered when testing for equality between two map elements or when hashing the map element |
'8dd2b485-e81e-49bd-8efb-19769d16b3a0'
|
label
|
str | None
|
|
None
|
refers_to
|
TerminalReference | None
|
|
None
|
TerminalLayout
dataclass
TerminalLayout(
fill: NoneValueType | Color | None = white,
stroke: NoneValueType | Color | None = black,
stroke_width: float | None = 1.25,
*,
id_: str = make_uuid4_as_str(),
layout_elements: tuple[LayoutElement] = tuple(),
group_fill: NoneValueType | Color | None = None,
group_fill_rule: FillRule | None = None,
group_filter: NoneValueType | Filter | None = None,
group_font_family: str | None = None,
group_font_size: float | None = None,
group_font_style: FontStyle | None = None,
group_font_weight: FontWeight | float | None = None,
group_stroke: NoneValueType | Color | None = None,
group_stroke_dasharray: tuple[float, ...] | None = None,
group_stroke_dashoffset: float | None = None,
group_stroke_width: float | None = None,
group_text_anchor: TextAnchor | None = None,
group_transform: NoneValueType
| tuple[Transformation]
| None = None,
filter: NoneValueType | Filter | None = None,
height: float = 35.0,
label: TextLayout | None = None,
position: Point,
stroke_dasharray: tuple[float, ...] | None = None,
stroke_dashoffset: float | None = None,
transform: NoneValueType
| tuple[Transformation]
| None = None,
width: float = 35.0,
direction: Direction = RIGHT,
angle: float = 70.0,
)
Bases: _SimpleMixin, SBGNNode
Class for terminal layouts
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id_
|
str
|
The id of the map element. This id is purely for the user to keep track of the element, it does not need to be unique and is not part of the identity of the element, i.e., it is not considered when testing for equality between two map elements or when hashing the map element |
'7d009f8f-0336-4ddb-9273-ce22eebb4fad'
|
layout_elements
|
tuple[LayoutElement]
|
The sub-layout elements of the group layout. These are part of the children of the group layout |
<dynamic>
|
group_fill
|
NoneValueType | Color | None
|
The fill color of the group layout |
None
|
group_fill_rule
|
FillRule | None
|
The fill rule of the group layout |
None
|
group_filter
|
NoneValueType | Filter | None
|
The filter of the group layout |
None
|
group_font_family
|
str | None
|
The font family of the group layout |
None
|
group_font_size
|
float | None
|
The font size of the group layout |
None
|
group_font_style
|
FontStyle | None
|
The font style of the group layout |
None
|
group_font_weight
|
FontWeight | float | None
|
The font weight of the group layout |
None
|
group_stroke
|
NoneValueType | Color | None
|
The stroke color of the group layout |
None
|
group_stroke_dasharray
|
tuple[float, ...] | None
|
The stroke dasharray of the group layout |
None
|
group_stroke_dashoffset
|
float | None
|
The stroke dashoffset of the group layout |
None
|
group_stroke_width
|
float | None
|
The stroke width of the group layout |
None
|
group_text_anchor
|
TextAnchor | None
|
The text anchor of the group layout |
None
|
group_transform
|
NoneValueType | tuple[Transformation] | None
|
The transform of the group layout |
None
|
fill
|
NoneValueType | Color | None
|
|
Color(red=255, green=255, blue=255, alpha=1.0)
|
filter
|
NoneValueType | Filter | None
|
The filter of the node |
None
|
height
|
float
|
|
35.0
|
label
|
TextLayout | None
|
The label of the node |
None
|
position
|
Point
|
The position of the node |
required |
stroke
|
NoneValueType | Color | None
|
|
Color(red=0, green=0, blue=0, alpha=1.0)
|
stroke_dasharray
|
tuple[float, ...] | None
|
The stroke dasharray of the node |
None
|
stroke_dashoffset
|
float | None
|
The stroke dashoffset of the node |
None
|
stroke_width
|
float | None
|
|
1.25
|
transform
|
NoneValueType | tuple[Transformation] | None
|
The transform of the node |
None
|
width
|
float
|
|
35.0
|
direction
|
Direction
|
|
<Direction.RIGHT: 4>
|
angle
|
float
|
|
70.0
|
Methods:
| Name | Description |
|---|---|
anchor_point |
Return an anchor point of the layout element |
bbox |
Compute and return the bounding box of the group layout element |
border |
Return the point on the border of the node that intersects the drawing elements of the node with the line formed of the center anchor point of the node and the given point. |
center |
Return the center anchor of the node |
childless |
Return a copy of the node with no children |
children |
Return the children of the group layout. |
contains |
Return |
descendants |
Return the descendants of the layout element |
drawing_elements |
Return the drawing elements of the group layout. |
east |
Return the east anchor of the node |
east_north_east |
Return the east north east anchor of the node |
east_south_east |
Return the east south east west anchor of the node |
equals |
Return |
flattened |
Return a list containing copy of the layout element with no children and all its descendants with no children |
label_center |
Return the label center anchor of the node |
north |
Return the north anchor of the node |
north_east |
Return the north east anchor of the node |
north_north_east |
Return the north north east anchor of the node |
north_north_west |
Return the north north west anchor of the node |
north_west |
Return the north west anchor of the node |
self_angle |
Return the point on the border of the node that intersects the self drawing elements of the node with the line passing through the center anchor point of the node and at a given angle from the horizontal. |
self_bbox |
Compute and return the bounding box of the self drawing element of the group layout |
self_border |
Return the point on the border of the node that intersects the self drawing elements of the node with the line formed of the center anchor point of the node and the given point. |
self_children |
Return the self children of the node. A node has unique child that is its label |
self_drawing_elements |
Return the node's own drawing elements |
self_to_shapely |
Compute and return a shapely collection of geometries reproducing the self drawing elements of the group layout |
size |
Return the size of the node |
south |
Return the south anchor of the node |
south_east |
Return the south east anchor of the node |
south_south_east |
Return the south south east anchor of the node |
south_south_west |
Return the south south west anchor of the node |
south_west |
Return the south west anchor of the node |
to_shapely |
Return a shapely collection of geometries reproducing the drawing elements of the layout element |
west |
Return the west anchor of the node |
west_north_west |
Return the west north west anchor of the node |
west_south_west |
Return the west south west anchor of the node |
Attributes:
| Name | Type | Description |
|---|---|---|
angle |
float
|
Return the point on the border of the node that intersects the drawing elements of the node with the line passing through the center anchor point of the node and at a given angle from the horizontal. |
x |
float
|
Return the x coordinate of the node |
y |
float
|
Return the y coordinate of the node |
anchor_point
anchor_point(anchor_name: str) -> Point
angle
class-attribute
instance-attribute
Return the point on the border of the node that intersects the drawing elements of the node with the line passing through the center anchor point of the node and at a given angle from the horizontal.
bbox
bbox() -> Bbox
Compute and return the bounding box of the group layout element
Source code in src/momapy/core.py
border
Return the point on the border of the node that intersects the drawing elements of the node with the line formed of the center anchor point of the node and the given point. When there are multiple intersection points, the one closest to the given point is returned
Source code in src/momapy/core.py
center
center() -> Point
childless
children
children() -> list[LayoutElement]
Return the children of the group layout.
These are the self children of the group layout (returned by the self_children method) and the other children of the group layout (given by the layout_elements attribute)
Source code in src/momapy/core.py
contains
contains(other: LayoutElement) -> bool
Return true if another layout element is a descendant of the layout element, false otherwise
drawing_elements
drawing_elements() -> list[DrawingElement]
Return the drawing elements of the group layout. The returned drawing elements are a group drawing element formed of the self drawing elements of the group layout and the drawing elements of its children
Source code in src/momapy/core.py
east
east() -> Point
east_north_east
east_north_east() -> Point
Return the east north east anchor of the node
Source code in src/momapy/core.py
east_south_east
east_south_east() -> Point
Return the east south east west anchor of the node
Source code in src/momapy/core.py
equals
equals(
other: LayoutElement,
flattened: bool = False,
unordered: bool = False,
) -> bool
Return true if the layout element is equal to another layout element, false otherwise
Source code in src/momapy/core.py
flattened
flattened() -> list[LayoutElement]
Return a list containing copy of the layout element with no children and all its descendants with no children
Source code in src/momapy/core.py
label_center
label_center() -> Point
north
north() -> Point
north_east
north_east() -> Point
Return the north east anchor of the node
Source code in src/momapy/core.py
north_north_east
north_north_east() -> Point
Return the north north east anchor of the node
Source code in src/momapy/core.py
north_north_west
north_north_west() -> Point
Return the north north west anchor of the node
Source code in src/momapy/core.py
north_west
north_west() -> Point
Return the north west anchor of the node
Source code in src/momapy/core.py
self_angle
self_angle(
angle: float,
unit: Literal["degrees", "radians"] = "degrees",
) -> Point
Return the point on the border of the node that intersects the self drawing elements of the node with the line passing through the center anchor point of the node and at a given angle from the horizontal.
Source code in src/momapy/core.py
self_bbox
self_bbox() -> Bbox
Compute and return the bounding box of the self drawing element of the group layout
self_border
Return the point on the border of the node that intersects the self drawing elements of the node with the line formed of the center anchor point of the node and the given point. When there are multiple intersection points, the one closest to the given point is returned
Source code in src/momapy/core.py
self_children
self_children() -> list[LayoutElement]
Return the self children of the node. A node has unique child that is its label
self_drawing_elements
self_drawing_elements() -> list[DrawingElement]
Return the node's own drawing elements
Source code in src/momapy/core.py
self_to_shapely
Compute and return a shapely collection of geometries reproducing the self drawing elements of the group layout
size
south
south() -> Point
south_east
south_east() -> Point
Return the south east anchor of the node
Source code in src/momapy/core.py
south_south_east
south_south_east() -> Point
Return the south south east anchor of the node
Source code in src/momapy/core.py
south_south_west
south_south_west() -> Point
Return the south south west anchor of the node
Source code in src/momapy/core.py
south_west
south_west() -> Point
Return the south west anchor of the node
Source code in src/momapy/core.py
to_shapely
Return a shapely collection of geometries reproducing the drawing elements of the layout element
Source code in src/momapy/core.py
west
west() -> Point
west_north_west
west_north_west() -> Point
Return the west north west anchor of the node
Source code in src/momapy/core.py
west_south_west
west_south_west() -> Point
Return the west south west anchor of the node
Source code in src/momapy/core.py
TerminalReference
dataclass
TerminalReference(
*,
id_: str = make_uuid4_as_str(),
element: Union[Activity, Compartment],
)
Bases: SBGNRole
Class for references of terminals
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id_
|
str
|
The id of the map element. This id is purely for the user to keep track of the element, it does not need to be unique and is not part of the identity of the element, i.e., it is not considered when testing for equality between two map elements or when hashing the map element |
'add72aaf-f5d7-4669-8f74-3b211de72929'
|
element
|
Activity | Compartment
|
|
required |
UnitOfInformation
dataclass
Bases: SBGNModelElement
Base class for units of information
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id_
|
str
|
The id of the map element. This id is purely for the user to keep track of the element, it does not need to be unique and is not part of the identity of the element, i.e., it is not considered when testing for equality between two map elements or when hashing the map element |
'969f16e2-b51d-4797-8413-eb8fe384bec3'
|
label
|
str | None
|
|
None
|
UnknownInfluence
dataclass
UnknownInfluence(
*,
id_: str = make_uuid4_as_str(),
source: BiologicalActivity | LogicalOperator,
target: Activity,
)
Bases: Influence
Class for unknown influences
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id_
|
str
|
The id of the map element. This id is purely for the user to keep track of the element, it does not need to be unique and is not part of the identity of the element, i.e., it is not considered when testing for equality between two map elements or when hashing the map element |
'8bcb1960-a64f-4dba-a00f-6df625010adc'
|
source
|
BiologicalActivity | LogicalOperator
|
|
required |
target
|
Activity
|
|
required |
UnknownInfluenceLayout
dataclass
UnknownInfluenceLayout(
path_fill: NoneValueType | Color | None = NoneValue,
path_stroke: NoneValueType | Color | None = black,
path_stroke_width: float | None = 1.25,
arrowhead_fill: NoneValueType | Color | None = white,
arrowhead_stroke: NoneValueType | Color | None = black,
arrowhead_stroke_width: float | None = 1.25,
*,
id_: str = make_uuid4_as_str(),
layout_elements: tuple[LayoutElement] = tuple(),
group_fill: NoneValueType | Color | None = None,
group_fill_rule: FillRule | None = None,
group_filter: NoneValueType | Filter | None = None,
group_font_family: str | None = None,
group_font_size: float | None = None,
group_font_style: FontStyle | None = None,
group_font_weight: FontWeight | float | None = None,
group_stroke: NoneValueType | Color | None = None,
group_stroke_dasharray: tuple[float, ...] | None = None,
group_stroke_dashoffset: float | None = None,
group_stroke_width: float | None = None,
group_text_anchor: TextAnchor | None = None,
group_transform: NoneValueType
| tuple[Transformation]
| None = None,
end_shorten: float = 0.0,
fill: NoneValueType | Color | None = None,
filter: NoneValueType | Filter | None = None,
path_filter: NoneValueType | Filter | None = None,
path_stroke_dasharray: tuple[float, ...] | None = None,
path_stroke_dashoffset: float | None = None,
path_transform: NoneValueType
| tuple[Transformation]
| None = None,
stroke: NoneValueType | Color | None = None,
stroke_dasharray: NoneValueType
| tuple[float]
| None = None,
stroke_dashoffset: float | None = None,
stroke_width: float | None = None,
segments: tuple[
Segment | BezierCurve | EllipticalArc
] = tuple(),
source: LayoutElement | None = None,
start_shorten: float = 0.0,
target: LayoutElement | None = None,
transform: NoneValueType
| tuple[Transformation]
| None = None,
arrowhead_filter: NoneValueType | Filter | None = None,
arrowhead_stroke_dasharray: tuple[float, ...]
| None = None,
arrowhead_stroke_dashoffset: float | None = None,
arrowhead_transform: NoneValueType
| tuple[Transformation]
| None = None,
arrowhead_height: float = 10.0,
arrowhead_width: float = 10.0,
)
Bases: SBGNSingleHeadedArc
Class for unknown influence layouts
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id_
|
str
|
The id of the map element. This id is purely for the user to keep track of the element, it does not need to be unique and is not part of the identity of the element, i.e., it is not considered when testing for equality between two map elements or when hashing the map element |
'73f40213-9237-4663-8f62-e020436aa48c'
|
layout_elements
|
tuple[LayoutElement]
|
The sub-layout elements of the group layout. These are part of the children of the group layout |
<dynamic>
|
group_fill
|
NoneValueType | Color | None
|
The fill color of the group layout |
None
|
group_fill_rule
|
FillRule | None
|
The fill rule of the group layout |
None
|
group_filter
|
NoneValueType | Filter | None
|
The filter of the group layout |
None
|
group_font_family
|
str | None
|
The font family of the group layout |
None
|
group_font_size
|
float | None
|
The font size of the group layout |
None
|
group_font_style
|
FontStyle | None
|
The font style of the group layout |
None
|
group_font_weight
|
FontWeight | float | None
|
The font weight of the group layout |
None
|
group_stroke
|
NoneValueType | Color | None
|
The stroke color of the group layout |
None
|
group_stroke_dasharray
|
tuple[float, ...] | None
|
The stroke dasharray of the group layout |
None
|
group_stroke_dashoffset
|
float | None
|
The stroke dashoffset of the group layout |
None
|
group_stroke_width
|
float | None
|
The stroke width of the group layout |
None
|
group_text_anchor
|
TextAnchor | None
|
The text anchor of the group layout |
None
|
group_transform
|
NoneValueType | tuple[Transformation] | None
|
The transform of the group layout |
None
|
end_shorten
|
float
|
The length the end of the arc will be shorten by |
0.0
|
fill
|
NoneValueType | Color | None
|
The fill color of the arc |
None
|
filter
|
NoneValueType | Filter | None
|
The fill filter of the arc |
None
|
path_fill
|
NoneValueType | Color | None
|
|
<momapy.drawing.NoneValueType object at 0x7fb32ae9f1d0>
|
path_filter
|
NoneValueType | Filter | None
|
The path filter of the arc |
None
|
path_stroke
|
NoneValueType | Color | None
|
|
Color(red=0, green=0, blue=0, alpha=1.0)
|
path_stroke_dasharray
|
tuple[float, ...] | None
|
The path stroke dasharray of the arc |
None
|
path_stroke_dashoffset
|
float | None
|
The path stroke dashoffset of the arc |
None
|
path_stroke_width
|
float | None
|
|
1.25
|
path_transform
|
NoneValueType | tuple[Transformation] | None
|
The path transform of the arc |
None
|
stroke
|
NoneValueType | Color | None
|
The stroke color of the arc |
None
|
stroke_dasharray
|
NoneValueType | tuple[float] | None
|
The stroke dasharray of the arc |
None
|
stroke_dashoffset
|
float | None
|
The stroke dashoffset of the arc |
None
|
stroke_width
|
float | None
|
The stroke width of the arc |
None
|
segments
|
tuple[Union[Segment, BezierCurve, EllipticalArc]]
|
The path segments of the arc |
<dynamic>
|
source
|
LayoutElement | None
|
The source of the arc |
None
|
start_shorten
|
float
|
The length the start of the arc will be shorten by |
0.0
|
target
|
LayoutElement | None
|
The target of the arc |
None
|
transform
|
NoneValueType | tuple[Transformation] | None
|
The transform of the arc |
None
|
arrowhead_fill
|
NoneValueType | Color | None
|
|
Color(red=255, green=255, blue=255, alpha=1.0)
|
arrowhead_filter
|
NoneValueType | Filter | None
|
The arrowhead filter of the arc |
None
|
arrowhead_stroke
|
NoneValueType | Color | None
|
|
Color(red=0, green=0, blue=0, alpha=1.0)
|
arrowhead_stroke_dasharray
|
tuple[float, ...] | None
|
The arrowhead stroke dasharray of the arc |
None
|
arrowhead_stroke_dashoffset
|
float | None
|
The arrowhead stroke dashoffset of the arc |
None
|
arrowhead_stroke_width
|
float | None
|
|
1.25
|
arrowhead_transform
|
NoneValueType | tuple[Transformation] | None
|
The arrowhead transform of the arc |
None
|
arrowhead_height
|
float
|
|
10.0
|
arrowhead_width
|
float
|
|
10.0
|
Methods:
| Name | Description |
|---|---|
anchor_point |
Return an anchor point of the layout element |
arrowhead_base |
Return the arrowhead base anchor point of the single-headed arc |
arrowhead_bbox |
Return the bounding box of the single-headed arc arrowhead |
arrowhead_border |
Return the point at the intersection of the drawing elements of the single-headed arc arrowhead and the line going through the center of these drawing elements and the given point. |
arrowhead_drawing_elements |
Return the drawing elements of the single-headed arc arrowhead |
arrowhead_length |
Return the length of the single-headed arc arrowhead |
arrowhead_tip |
Return the arrowhead tip anchor point of the single-headed arc |
bbox |
Compute and return the bounding box of the group layout element |
childless |
Return a copy of the arc with no children |
children |
Return the children of the group layout. |
contains |
Return |
descendants |
Return the descendants of the layout element |
drawing_elements |
Return the drawing elements of the group layout. |
end_point |
Return the ending point of the arc |
equals |
Return |
flattened |
Return a list containing copy of the layout element with no children and all its descendants with no children |
fraction |
Return the position and angle on the arc at a given fraction (of the total arc length) |
length |
Return the total length of the arc path |
path_drawing_elements |
Return the drawing elements of the single-headed arc path |
points |
Return the points of the arc path |
self_bbox |
Compute and return the bounding box of the self drawing element of the group layout |
self_children |
Return the self children of the arc |
self_drawing_elements |
Return the self drawing elements of the single-headed arc |
self_to_shapely |
Compute and return a shapely collection of geometries reproducing the self drawing elements of the group layout |
start_point |
Return the starting point of the arc |
to_shapely |
Return a shapely collection of geometries reproducing the drawing elements of the layout element |
anchor_point
anchor_point(anchor_name: str) -> Point
arrowhead_base
arrowhead_base() -> Point
Return the arrowhead base anchor point of the single-headed arc
Source code in src/momapy/core.py
arrowhead_border
arrowhead_border(point) -> Point
Return the point at the intersection of the drawing elements of the single-headed arc arrowhead and the line going through the center of these drawing elements and the given point. When there are multiple intersection points, the one closest to the given point is returned
Source code in src/momapy/core.py
arrowhead_drawing_elements
arrowhead_drawing_elements() -> list[DrawingElement]
Return the drawing elements of the single-headed arc arrowhead
Source code in src/momapy/core.py
arrowhead_length
Return the length of the single-headed arc arrowhead
Source code in src/momapy/core.py
arrowhead_tip
arrowhead_tip() -> Point
Return the arrowhead tip anchor point of the single-headed arc
Source code in src/momapy/core.py
bbox
bbox() -> Bbox
Compute and return the bounding box of the group layout element
Source code in src/momapy/core.py
childless
children
children() -> list[LayoutElement]
Return the children of the group layout.
These are the self children of the group layout (returned by the self_children method) and the other children of the group layout (given by the layout_elements attribute)
Source code in src/momapy/core.py
contains
contains(other: LayoutElement) -> bool
Return true if another layout element is a descendant of the layout element, false otherwise
drawing_elements
drawing_elements() -> list[DrawingElement]
Return the drawing elements of the group layout. The returned drawing elements are a group drawing element formed of the self drawing elements of the group layout and the drawing elements of its children
Source code in src/momapy/core.py
end_point
end_point() -> Point
equals
equals(
other: LayoutElement,
flattened: bool = False,
unordered: bool = False,
) -> bool
Return true if the layout element is equal to another layout element, false otherwise
Source code in src/momapy/core.py
flattened
flattened() -> list[LayoutElement]
Return a list containing copy of the layout element with no children and all its descendants with no children
Source code in src/momapy/core.py
fraction
fraction(fraction: float) -> tuple[Point, float]
Return the position and angle on the arc at a given fraction (of the total arc length)
Source code in src/momapy/core.py
length
path_drawing_elements
path_drawing_elements() -> list[Path]
Return the drawing elements of the single-headed arc path
Source code in src/momapy/core.py
points
points() -> list[Point]
self_bbox
self_bbox() -> Bbox
Compute and return the bounding box of the self drawing element of the group layout
self_children
self_children() -> list[LayoutElement]
self_drawing_elements
self_drawing_elements() -> list[DrawingElement]
Return the self drawing elements of the single-headed arc
Source code in src/momapy/core.py
self_to_shapely
Compute and return a shapely collection of geometries reproducing the self drawing elements of the group layout
start_point
start_point() -> Point
to_shapely
Return a shapely collection of geometries reproducing the drawing elements of the layout element
Source code in src/momapy/core.py
UnspecifiedEntityUnitOfInformation
dataclass
UnspecifiedEntityUnitOfInformation(
*,
id_: str = make_uuid4_as_str(),
label: Optional[str] = None,
)
Bases: UnitOfInformation
Class for unspecified entity units of information
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id_
|
str
|
The id of the map element. This id is purely for the user to keep track of the element, it does not need to be unique and is not part of the identity of the element, i.e., it is not considered when testing for equality between two map elements or when hashing the map element |
'8c4a6adc-1328-4ba0-97a6-8b8871691cf0'
|
label
|
str | None
|
|
None
|
UnspecifiedEntityUnitOfInformationLayout
dataclass
UnspecifiedEntityUnitOfInformationLayout(
fill: NoneValueType | Color | None = white,
stroke: NoneValueType | Color | None = black,
stroke_width: float | None = 1.25,
*,
id_: str = make_uuid4_as_str(),
layout_elements: tuple[LayoutElement] = tuple(),
group_fill: NoneValueType | Color | None = None,
group_fill_rule: FillRule | None = None,
group_filter: NoneValueType | Filter | None = None,
group_font_family: str | None = None,
group_font_size: float | None = None,
group_font_style: FontStyle | None = None,
group_font_weight: FontWeight | float | None = None,
group_stroke: NoneValueType | Color | None = None,
group_stroke_dasharray: tuple[float, ...] | None = None,
group_stroke_dashoffset: float | None = None,
group_stroke_width: float | None = None,
group_text_anchor: TextAnchor | None = None,
group_transform: NoneValueType
| tuple[Transformation]
| None = None,
filter: NoneValueType | Filter | None = None,
height: float = 12.0,
label: TextLayout | None = None,
position: Point,
stroke_dasharray: tuple[float, ...] | None = None,
stroke_dashoffset: float | None = None,
transform: NoneValueType
| tuple[Transformation]
| None = None,
width: float = 12.0,
)
Bases: _SimpleMixin, SBGNNode
Class for unspecified entity unit of information layouts
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id_
|
str
|
The id of the map element. This id is purely for the user to keep track of the element, it does not need to be unique and is not part of the identity of the element, i.e., it is not considered when testing for equality between two map elements or when hashing the map element |
'd971c3c4-2558-4744-a605-f4ba545748c9'
|
layout_elements
|
tuple[LayoutElement]
|
The sub-layout elements of the group layout. These are part of the children of the group layout |
<dynamic>
|
group_fill
|
NoneValueType | Color | None
|
The fill color of the group layout |
None
|
group_fill_rule
|
FillRule | None
|
The fill rule of the group layout |
None
|
group_filter
|
NoneValueType | Filter | None
|
The filter of the group layout |
None
|
group_font_family
|
str | None
|
The font family of the group layout |
None
|
group_font_size
|
float | None
|
The font size of the group layout |
None
|
group_font_style
|
FontStyle | None
|
The font style of the group layout |
None
|
group_font_weight
|
FontWeight | float | None
|
The font weight of the group layout |
None
|
group_stroke
|
NoneValueType | Color | None
|
The stroke color of the group layout |
None
|
group_stroke_dasharray
|
tuple[float, ...] | None
|
The stroke dasharray of the group layout |
None
|
group_stroke_dashoffset
|
float | None
|
The stroke dashoffset of the group layout |
None
|
group_stroke_width
|
float | None
|
The stroke width of the group layout |
None
|
group_text_anchor
|
TextAnchor | None
|
The text anchor of the group layout |
None
|
group_transform
|
NoneValueType | tuple[Transformation] | None
|
The transform of the group layout |
None
|
fill
|
NoneValueType | Color | None
|
|
Color(red=255, green=255, blue=255, alpha=1.0)
|
filter
|
NoneValueType | Filter | None
|
The filter of the node |
None
|
height
|
float
|
|
12.0
|
label
|
TextLayout | None
|
The label of the node |
None
|
position
|
Point
|
The position of the node |
required |
stroke
|
NoneValueType | Color | None
|
|
Color(red=0, green=0, blue=0, alpha=1.0)
|
stroke_dasharray
|
tuple[float, ...] | None
|
The stroke dasharray of the node |
None
|
stroke_dashoffset
|
float | None
|
The stroke dashoffset of the node |
None
|
stroke_width
|
float | None
|
|
1.25
|
transform
|
NoneValueType | tuple[Transformation] | None
|
The transform of the node |
None
|
width
|
float
|
|
12.0
|
Methods:
| Name | Description |
|---|---|
anchor_point |
Return an anchor point of the layout element |
angle |
Return the point on the border of the node that intersects the drawing elements of the node with the line passing through the center anchor point of the node and at a given angle from the horizontal. |
bbox |
Compute and return the bounding box of the group layout element |
border |
Return the point on the border of the node that intersects the drawing elements of the node with the line formed of the center anchor point of the node and the given point. |
center |
Return the center anchor of the node |
childless |
Return a copy of the node with no children |
children |
Return the children of the group layout. |
contains |
Return |
descendants |
Return the descendants of the layout element |
drawing_elements |
Return the drawing elements of the group layout. |
east |
Return the east anchor of the node |
east_north_east |
Return the east north east anchor of the node |
east_south_east |
Return the east south east west anchor of the node |
equals |
Return |
flattened |
Return a list containing copy of the layout element with no children and all its descendants with no children |
label_center |
Return the label center anchor of the node |
north |
Return the north anchor of the node |
north_east |
Return the north east anchor of the node |
north_north_east |
Return the north north east anchor of the node |
north_north_west |
Return the north north west anchor of the node |
north_west |
Return the north west anchor of the node |
self_angle |
Return the point on the border of the node that intersects the self drawing elements of the node with the line passing through the center anchor point of the node and at a given angle from the horizontal. |
self_bbox |
Compute and return the bounding box of the self drawing element of the group layout |
self_border |
Return the point on the border of the node that intersects the self drawing elements of the node with the line formed of the center anchor point of the node and the given point. |
self_children |
Return the self children of the node. A node has unique child that is its label |
self_drawing_elements |
Return the node's own drawing elements |
self_to_shapely |
Compute and return a shapely collection of geometries reproducing the self drawing elements of the group layout |
size |
Return the size of the node |
south |
Return the south anchor of the node |
south_east |
Return the south east anchor of the node |
south_south_east |
Return the south south east anchor of the node |
south_south_west |
Return the south south west anchor of the node |
south_west |
Return the south west anchor of the node |
to_shapely |
Return a shapely collection of geometries reproducing the drawing elements of the layout element |
west |
Return the west anchor of the node |
west_north_west |
Return the west north west anchor of the node |
west_south_west |
Return the west south west anchor of the node |
Attributes:
| Name | Type | Description |
|---|---|---|
x |
float
|
Return the x coordinate of the node |
y |
float
|
Return the y coordinate of the node |
anchor_point
anchor_point(anchor_name: str) -> Point
angle
angle(
angle: float,
unit: Literal["degrees", "radians"] = "degrees",
) -> Point
Return the point on the border of the node that intersects the drawing elements of the node with the line passing through the center anchor point of the node and at a given angle from the horizontal.
Source code in src/momapy/core.py
bbox
bbox() -> Bbox
Compute and return the bounding box of the group layout element
Source code in src/momapy/core.py
border
Return the point on the border of the node that intersects the drawing elements of the node with the line formed of the center anchor point of the node and the given point. When there are multiple intersection points, the one closest to the given point is returned
Source code in src/momapy/core.py
center
center() -> Point
childless
children
children() -> list[LayoutElement]
Return the children of the group layout.
These are the self children of the group layout (returned by the self_children method) and the other children of the group layout (given by the layout_elements attribute)
Source code in src/momapy/core.py
contains
contains(other: LayoutElement) -> bool
Return true if another layout element is a descendant of the layout element, false otherwise
drawing_elements
drawing_elements() -> list[DrawingElement]
Return the drawing elements of the group layout. The returned drawing elements are a group drawing element formed of the self drawing elements of the group layout and the drawing elements of its children
Source code in src/momapy/core.py
east
east() -> Point
east_north_east
east_north_east() -> Point
Return the east north east anchor of the node
Source code in src/momapy/core.py
east_south_east
east_south_east() -> Point
Return the east south east west anchor of the node
Source code in src/momapy/core.py
equals
equals(
other: LayoutElement,
flattened: bool = False,
unordered: bool = False,
) -> bool
Return true if the layout element is equal to another layout element, false otherwise
Source code in src/momapy/core.py
flattened
flattened() -> list[LayoutElement]
Return a list containing copy of the layout element with no children and all its descendants with no children
Source code in src/momapy/core.py
label_center
label_center() -> Point
north
north() -> Point
north_east
north_east() -> Point
Return the north east anchor of the node
Source code in src/momapy/core.py
north_north_east
north_north_east() -> Point
Return the north north east anchor of the node
Source code in src/momapy/core.py
north_north_west
north_north_west() -> Point
Return the north north west anchor of the node
Source code in src/momapy/core.py
north_west
north_west() -> Point
Return the north west anchor of the node
Source code in src/momapy/core.py
self_angle
self_angle(
angle: float,
unit: Literal["degrees", "radians"] = "degrees",
) -> Point
Return the point on the border of the node that intersects the self drawing elements of the node with the line passing through the center anchor point of the node and at a given angle from the horizontal.
Source code in src/momapy/core.py
self_bbox
self_bbox() -> Bbox
Compute and return the bounding box of the self drawing element of the group layout
self_border
Return the point on the border of the node that intersects the self drawing elements of the node with the line formed of the center anchor point of the node and the given point. When there are multiple intersection points, the one closest to the given point is returned
Source code in src/momapy/core.py
self_children
self_children() -> list[LayoutElement]
Return the self children of the node. A node has unique child that is its label
self_drawing_elements
self_drawing_elements() -> list[DrawingElement]
Return the node's own drawing elements
Source code in src/momapy/core.py
self_to_shapely
Compute and return a shapely collection of geometries reproducing the self drawing elements of the group layout
size
south
south() -> Point
south_east
south_east() -> Point
Return the south east anchor of the node
Source code in src/momapy/core.py
south_south_east
south_south_east() -> Point
Return the south south east anchor of the node
Source code in src/momapy/core.py
south_south_west
south_south_west() -> Point
Return the south south west anchor of the node
Source code in src/momapy/core.py
south_west
south_west() -> Point
Return the south west anchor of the node
Source code in src/momapy/core.py
to_shapely
Return a shapely collection of geometries reproducing the drawing elements of the layout element
Source code in src/momapy/core.py
west
west() -> Point
west_north_west
west_north_west() -> Point
Return the west north west anchor of the node
Source code in src/momapy/core.py
west_south_west
west_south_west() -> Point
Return the west south west anchor of the node